JsonLoadFlowParameters { public static LoadFlowParameters update(LoadFlowParameters parameters, Path jsonFile) { Objects.requireNonNull(jsonFile); try (InputStream is = Files.newInputStream(jsonFile)) { return update(parameters, is); } catch (IOException e) { throw new UncheckedIOException(e); } } private  JsonLoadFlowParameters(); static ExtensionProviders<ExtensionSerializer> getExtensionSerializers(); static LoadFlowParameters read(Path jsonFile); static LoadFlowParameters read(InputStream jsonStream); static LoadFlowParameters update(LoadFlowParameters parameters, Path jsonFile); static LoadFlowParameters update(LoadFlowParameters parameters, InputStream jsonStream); static void write(LoadFlowParameters parameters, Path jsonFile); static void write(LoadFlowParameters parameters, OutputStream outputStream); static LoadFlowParameters deserialize(JsonParser parser, DeserializationContext context, LoadFlowParameters parameters); static LoadFlowParameters deserialize(JsonParser parser, DeserializationContext context); static void serialize(LoadFlowParameters parameters, JsonGenerator jsonGenerator, SerializerProvider serializerProvider);  }
@Test public void updateExtension() throws IOError { LoadFlowParameters parameters = new LoadFlowParameters(); DummyExtension extension = new DummyExtension(); extension.setParameterDouble(2.5); extension.setParameterBoolean(false); extension.setParameterString("Hello World !"); DummyExtension oldExtension = new DummyExtension(extension); parameters.addExtension(DummyExtension.class, extension); JsonLoadFlowParameters.update(parameters, getClass().getResourceAsStream("/LoadFlowParametersUpdate.json")); extension = parameters.getExtension(DummyExtension.class); assertEquals(oldExtension.isParameterBoolean(), extension.isParameterBoolean()); assertNotEquals(oldExtension.getParameterDouble(), extension.getParameterDouble()); assertNotEquals(oldExtension.getParameterString(), extension.getParameterString()); }