UserPositionManager { public void updateItems(final List<UserPositionItem> userPositionItems) { overlay.removeAllItems(); overlay.addItems(userPositionItems); mapView.postInvalidate(); } UserPositionManager(final Activity activity, final MapView mapView);  UserPositionManager(final Activity activity, final MapView mapView,
                               final UserPositionItem userPositionItem); void setNeighbours(final SortedSet<NicGeoPoint> neighbours); void setNeighboursWithOutliers(final SortedSet<NicGeoPoint> neighboursWithOutliers); void setParticles(List<Particle> particles); void updateItems(final List<UserPositionItem> userPositionItems); void disablePosition(); SortedSet<NicGeoPoint> getNeighbours(); SortedSet<NicGeoPoint> getOutliers(); NicGeoPoint getBoundingBoxCenter();  }
@Test public void testThatUpdateItemAddsItemToTheOverlay() { ItemizedIconOverlay<UserPositionItem> overlay = spy(userPositionManager.overlay); userPositionManager.overlay = overlay; List<UserPositionItem> items = new ArrayList<UserPositionItem>(); items.add(item); userPositionManager.updateItems(items); verify(overlay, times(1)).removeAllItems(); verify(overlay, times(1)).addItems(any(List.class)); }