### Question:
AbnormalAnalyzerAppModule extends AbstractModule { @Provides GeoMaskFilter provideGeoMaskFilter() { List<BoundingBox> boundingBoxes = null; final URL geomaskResource = getGeomaskResource(); LOG.info("Reading geomask from " + geomaskResource.toString()); try { boundingBoxes = parseGeoMaskXmlInputStream(geomaskResource.openStream()); } catch (IOException e) { LOG.error(e.getMessage(), e); } return new GeoMaskFilter(boundingBoxes); } AbnormalAnalyzerAppModule(Path configFile); @Override void configure(); final static long STARTUP_TIMESTAMP; }### Answer:
@Test public void canReadXmlResourceForGeoMaskFilter() throws Exception { URL configResource = this.getClass().getClassLoader().getResource("analyzer.properties"); AbnormalAnalyzerAppModule appModule = new AbnormalAnalyzerAppModule(new File(configResource.toURI()).toPath()); GeoMaskFilter geoMaskFilter = appModule.provideGeoMaskFilter(); List<BoundingBox> boundingBoxes = geoMaskFilter.getSuppressedBoundingBoxes(); assertNotNull(boundingBoxes); assertEquals(258, boundingBoxes.size()); assertEquals(56.13767740, boundingBoxes.get(0).getMinLat(), 1e-8); assertEquals(56.17285020, boundingBoxes.get(0).getMaxLat(), 1e-8); assertEquals(10.20465090, boundingBoxes.get(0).getMinLon(), 1e-8); assertEquals(10.26770390, boundingBoxes.get(0).getMaxLon(), 1e-8); assertEquals(55.55393080, boundingBoxes.get(1).getMinLat(), 1e-8); assertEquals(55.56227290, boundingBoxes.get(1).getMaxLat(), 1e-8); assertEquals( 9.72816210, boundingBoxes.get(1).getMinLon(), 1e-8); assertEquals( 9.76877229, boundingBoxes.get(1).getMaxLon(), 1e-8); }