DetectorUtil { public static DetectorSource buildDetectorSource(Config config) { val uriTemplate = config.getString(CK_MODEL_SERVICE_URI_TEMPLATE); val client = new DetectorClient(new HttpClientWrapper(), uriTemplate, new ObjectMapper()); val registry = new DetectorFactory(); return new DefaultDetectorSource(client, registry); }  static DetectorSource buildDetectorSource(Config config);  }
@Test public void testBuildDetectorSource() { val config = ConfigFactory.load("detector-manager.conf"); val source = DetectorUtil.buildDetectorSource(config); assertNotNull(source); }