JsonSensitivityFactorsProviderFactory implements SensitivityFactorsProviderFactory { @Override public JsonSensitivityFactorsProvider create() { ModuleConfig config = PlatformConfig.defaultConfig().getModuleConfig("json-sensitivity-factors"); Path jsonFile = config.getPathProperty("json-file"); return new JsonSensitivityFactorsProvider(jsonFile); }  @Override JsonSensitivityFactorsProvider create(); @Override JsonSensitivityFactorsProvider create(Path sensitivityFactorsFile); @Override JsonSensitivityFactorsProvider create(InputStream data);  }
@Test public void createFromStream() { SensitivityFactorsProviderFactory factory = new JsonSensitivityFactorsProviderFactory(); SensitivityFactorsProvider provider = factory.create(JsonSensitivityFactorsProviderFactoryTest.class.getResourceAsStream("/sensitivityFactorsExample.json")); assertTrue(provider instanceof JsonSensitivityFactorsProvider); }
@Test public void createFromPath() throws URISyntaxException { SensitivityFactorsProviderFactory factory = new JsonSensitivityFactorsProviderFactory(); SensitivityFactorsProvider provider = factory.create(Paths.get(JsonSensitivityFactorsProviderFactoryTest.class.getResource("/sensitivityFactorsExample.json").toURI())); assertTrue(provider instanceof JsonSensitivityFactorsProvider); }