CapabilitiesUpdateService { protected static boolean canUpdate(String type) { switch (type) { case OskariLayer.TYPE_WMS: case OskariLayer.TYPE_WMTS: return true; default: return false; } } CapabilitiesUpdateService(OskariLayerService layerService,
            CapabilitiesCacheService capabilitiesService); List<CapabilitiesUpdateResult> updateCapabilities(List<OskariLayer> layersToUpdate, Set<String> systemCRSs);  }
@Test public void testCanUpdate() { assertTrue("Should allow WMTS", CapabilitiesUpdateService.canUpdate(OskariLayer.TYPE_WMTS)); assertTrue("Should allow WMS", CapabilitiesUpdateService.canUpdate(OskariLayer.TYPE_WMS)); assertFalse("Should NOT allow WFS", CapabilitiesUpdateService.canUpdate(OskariLayer.TYPE_WFS)); assertFalse("Should NOT allow analysis", CapabilitiesUpdateService.canUpdate(OskariLayer.TYPE_ANALYSIS)); assertFalse("Should NOT allow argcis93", CapabilitiesUpdateService.canUpdate(OskariLayer.TYPE_ARCGIS93)); assertFalse("Should NOT allow stats", CapabilitiesUpdateService.canUpdate(OskariLayer.TYPE_STATS)); assertFalse("Should NOT allow userlayer", CapabilitiesUpdateService.canUpdate(OskariLayer.TYPE_USERLAYER)); }