MapContent { public boolean addLayer(Layer layer) { monitor.writeLock().lock(); try { return layerList.addIfAbsent(layer); } finally { monitor.writeLock().unlock(); } } MapContent();  MapContent(MapContext context); @Deprecated  MapContent(CoordinateReferenceSystem crs); @Deprecated  MapContent(MapLayer[] array); @Deprecated  MapContent(MapLayer[] array, CoordinateReferenceSystem crs); @Deprecated  MapContent(MapLayer[] array, String title, String contextAbstract, String contactInformation,
            String[] keywords); @Deprecated  MapContent(MapLayer[] array, String title, String contextAbstract, String contactInformation,
            String[] keywords, final CoordinateReferenceSystem crs); void dispose(); void addMapLayerListListener(MapLayerListListener listener); void removeMapLayerListListener(MapLayerListListener listener); boolean addLayer(Layer layer); int addLayers(Collection<? extends Layer> layers); boolean removeLayer(Layer layer); void moveLayer(int sourcePosition, int destPosition); List<Layer> layers(); ReferencedEnvelope getMaxBounds(); MapViewport getViewport(); void setViewport(MapViewport viewport); void addMapBoundsListener(MapBoundsListener listener); void removeMapBoundsListener(MapBoundsListener listener); CoordinateReferenceSystem getCoordinateReferenceSystem(); void addPropertyChangeListener(java.beans.PropertyChangeListener listener); void removePropertyChangeListener(java.beans.PropertyChangeListener listener); java.util.Map<String, Object> getUserData(); String getTitle(); void setTitle(String title);  }
@Test public void addLayerAndGetEvent() { listener.setExpected(WaitingMapListener.Type.ADDED); mapContent.addLayer(new MockLayer(WORLD)); assertTrue(listener.await(WaitingMapListener.Type.ADDED, LISTENER_TIMEOUT)); }