@Test(expected = RuntimeException.class) public void testBuild_invalidHyperparams() { val factoryUnderTest = new EdmxDetectorFactoryProvider(); val document = readDocument("edmx-invalid-hyperparams"); factoryUnderTest.buildDetector(document); }
@Override public EdmxDetector buildDetector(DetectorDocument document) { notNull(document, "document can't be null"); val hyperparamsMap = document.getConfig().get("hyperparams"); val hyperparams = objectMapper.convertValue(hyperparamsMap, EdmxHyperparams.class); val trusted = document.isTrusted(); return new EdmxDetector(document.getUuid(), hyperparams, trusted); }
EdmxDetectorFactoryProvider implements DetectorFactoryProvider<EdmxDetector> { @Override public EdmxDetector buildDetector(DetectorDocument document) { notNull(document, "document can't be null"); val hyperparamsMap = document.getConfig().get("hyperparams"); val hyperparams = objectMapper.convertValue(hyperparamsMap, EdmxHyperparams.class); val trusted = document.isTrusted(); return new EdmxDetector(document.getUuid(), hyperparams, trusted); } }
EdmxDetectorFactoryProvider implements DetectorFactoryProvider<EdmxDetector> { @Override public EdmxDetector buildDetector(DetectorDocument document) { notNull(document, "document can't be null"); val hyperparamsMap = document.getConfig().get("hyperparams"); val hyperparams = objectMapper.convertValue(hyperparamsMap, EdmxHyperparams.class); val trusted = document.isTrusted(); return new EdmxDetector(document.getUuid(), hyperparams, trusted); }  }
EdmxDetectorFactoryProvider implements DetectorFactoryProvider<EdmxDetector> { @Override public EdmxDetector buildDetector(DetectorDocument document) { notNull(document, "document can't be null"); val hyperparamsMap = document.getConfig().get("hyperparams"); val hyperparams = objectMapper.convertValue(hyperparamsMap, EdmxHyperparams.class); val trusted = document.isTrusted(); return new EdmxDetector(document.getUuid(), hyperparams, trusted); }  @Override EdmxDetector buildDetector(DetectorDocument document); }
EdmxDetectorFactoryProvider implements DetectorFactoryProvider<EdmxDetector> { @Override public EdmxDetector buildDetector(DetectorDocument document) { notNull(document, "document can't be null"); val hyperparamsMap = document.getConfig().get("hyperparams"); val hyperparams = objectMapper.convertValue(hyperparamsMap, EdmxHyperparams.class); val trusted = document.isTrusted(); return new EdmxDetector(document.getUuid(), hyperparams, trusted); }  @Override EdmxDetector buildDetector(DetectorDocument document);  }