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