JsonSecurityAnalysisParameters { public static SecurityAnalysisParameters read(Path jsonFile) { return update(new SecurityAnalysisParameters(), jsonFile); } private  JsonSecurityAnalysisParameters(); static ExtensionProviders<ExtensionSerializer> getExtensionSerializers(); static SecurityAnalysisParameters read(Path jsonFile); static SecurityAnalysisParameters read(InputStream jsonStream); static SecurityAnalysisParameters update(SecurityAnalysisParameters parameters, Path jsonFile); static SecurityAnalysisParameters update(SecurityAnalysisParameters parameters, InputStream jsonStream); static void write(SecurityAnalysisParameters parameters, Path jsonFile); static void write(SecurityAnalysisParameters parameters, OutputStream outputStream); static SecurityAnalysisParameters deserialize(JsonParser parser, DeserializationContext context, SecurityAnalysisParameters parameters); static SecurityAnalysisParameters deserialize(JsonParser parser, DeserializationContext context); static void serialize(SecurityAnalysisParameters parameters, JsonGenerator jsonGenerator, SerializerProvider serializerProvider);  }
@Test public void readExtension() throws IOException { SecurityAnalysisParameters parameters = JsonSecurityAnalysisParameters.read(getClass().getResourceAsStream("/SecurityAnalysisParametersWithExtension.json")); assertEquals(1, parameters.getExtensions().size()); assertNotNull(parameters.getExtension(DummyExtension.class)); assertNotNull(parameters.getExtensionByName("dummy-extension")); }
@Test public void readError() { expected.expect(AssertionError.class); expected.expectMessage("Unexpected field: unexpected"); JsonSecurityAnalysisParameters.read(getClass().getResourceAsStream("/SecurityAnalysisParametersInvalid.json")); }