@Test public void toDoubles() throws Exception { when(mockLocation.getLatitude()).thenReturn(55.55); when(mockLocation.getLongitude()).thenReturn(90.00); when(mockLocation.getTime()).thenReturn((long)1521158400); assertEquals(positionString ,PositionConverter.toDoubles(mockLocation)); }
@TypeConverter public static String toDoubles(Location location) { if (location == null) return null; return location.getLatitude() + "#" + location.getLongitude() + "#" + location.getTime(); }
PositionConverter { @TypeConverter public static String toDoubles(Location location) { if (location == null) return null; return location.getLatitude() + "#" + location.getLongitude() + "#" + location.getTime(); } }
PositionConverter { @TypeConverter public static String toDoubles(Location location) { if (location == null) return null; return location.getLatitude() + "#" + location.getLongitude() + "#" + location.getTime(); }  }
PositionConverter { @TypeConverter public static String toDoubles(Location location) { if (location == null) return null; return location.getLatitude() + "#" + location.getLongitude() + "#" + location.getTime(); }  @TypeConverter static Location toLocation(String location); @TypeConverter static String toDoubles(Location location); }
PositionConverter { @TypeConverter public static String toDoubles(Location location) { if (location == null) return null; return location.getLatitude() + "#" + location.getLongitude() + "#" + location.getTime(); }  @TypeConverter static Location toLocation(String location); @TypeConverter static String toDoubles(Location location);  }