PolylineOptionsMapper implements Mapper<PolylineOptions, com.google.android.gms.maps.model.PolylineOptions> { @Override public com.google.android.gms.maps.model.PolylineOptions map(PolylineOptions input) { List<LatLng> points = AnyMapAdapter.adaptList(com.car2go.maps.model.LatLng.class, input.getPoints()); return new com.google.android.gms.maps.model.PolylineOptions() .color(input.getColor()) .width(input.getWidth()) .addAll(points); }  @Override com.google.android.gms.maps.model.PolylineOptions map(PolylineOptions input);  }
@Test public void testMap() throws Exception { PolylineOptionsMapper mapper = new PolylineOptionsMapper(); PolylineOptions input = new PolylineOptions() .color(0xff0000) .width(10f) .add(new LatLng(10, 10)); com.google.android.gms.maps.model.PolylineOptions output = mapper.map(input); assertEquals( input.getColor(), output.getColor() ); assertEquals( input.getWidth(), output.getWidth(), 0 ); assertEquals( 1, output.getPoints().size() ); TestUtil.assertEquals( input.getPoints().get(0), output.getPoints().get(0) ); }