DrawableComponentFactory { public Polyline addPolyline(PolylineOptions options) { com.google.android.gms.maps.model.PolylineOptions googleOptions = AnyMapAdapter.adapt(options); com.google.android.gms.maps.model.Polyline polyline = map.addPolyline(googleOptions); return AnyMapAdapter.adapt(polyline); } DrawableComponentFactory(GoogleMap map); Marker addMarker(MarkerOptions options); Circle addCircle(CircleOptions options); Polygon addPolygon(PolygonOptions options); Polyline addPolyline(PolylineOptions options);  }
@Test public void testAddPolyline() throws Exception { PolylineOptions options = new PolylineOptions(); GoogleMap map = mock(GoogleMap.class); DrawableComponentFactory factory = new DrawableComponentFactory(map); factory.addPolyline(options); verify(map).addPolyline(any(com.google.android.gms.maps.model.PolylineOptions.class)); }