Location extends ScreenInfo { @Override void setParams() { DecimalFormat format = new DecimalFormat(DECIMAL_FORMAT); tracker.setParam(Hit.HitParam.GPSLatitude.stringValue(), format.format(latitude).replace(",", ".")) .setParam(Hit.HitParam.GPSLongitude.stringValue(), format.format(longitude).replace(",", ".")); } Location(Tracker tracker); double getLatitude(); double getLongitude(); Location setLatitude(double latitude); Location setLongitude(double longitude);  }
@Test public void setParamsTest() { location.setLatitude(87876576.87787).setLongitude(3786765.915656).setParams(); assertEquals(2, buffer.getVolatileParams().size()); assertEquals(0, buffer.getPersistentParams().size()); assertEquals(1, buffer.getVolatileParams().get("gy").getValues().size()); assertEquals("87876576.88", buffer.getVolatileParams().get("gy").getValues().get(0).execute()); assertEquals(1, buffer.getVolatileParams().get("gx").getValues().size()); assertEquals("3786765.92", buffer.getVolatileParams().get("gx").getValues().get(0).execute()); }