Creating Mock Location

Hello Koders,
Is it possible to mock location in kodular. I tried adding map and location sensor, then i said move map-get latitude from address and get longitude from address then i added location name. My intention was that once the map zooms to the location, then i move to settings, developer option then i mock the location. i want my location to be changed to that location given. i tried this but seams not working. is there a way i can go about it?
i searched on stack overflow and i found out that Google map doesn’t work for mock location.
I haven’t tried the map component, i discovered that the mock location app i see on play store uses map not Google map.

i don’t know if its even possible to create a simple extension for it. i got this code from stack overflow but i don’t know what library to import.

// In your MapFragment implementation or similar
if (BuildConfig.DEBUG)
map.setLocationSource(new MockLocationSource());
public class MockLocationSource implements LocationSource {

private static final float ACCURACY = 1; // Meters
private static final int MAX_SPEED = 10; // m/s
private static final LatLng CENTER = new LatLng(59.91127, 10.70834);
private static final double DELTA_LAT = 0.0005;
private static final double DELTA_LON = 0.0005;

private static final long UPDATE_PERIOD = TimeUnit.SECONDS.toMillis(2);

private final Handler handler = new Handler();
private LatLng lastCoordinate = CENTER;
private OnLocationChangedListener listener;

private void scheduleNewFix() {
    handler.postDelayed(updateLocationRunnable, UPDATE_PERIOD);