JvmOptions implements UnknownPropertyPreserving, Serializable { @JsonProperty("-XX") @Description("A map of -XX options to the JVM") public Map<String, String> getXx() { return xx; }  @JsonProperty("-Xmx") @Pattern("[0-9]+[mMgG]?") @Description("-Xmx option to to the JVM") String getXmx(); void setXmx(String xmx); @JsonProperty("-Xms") @Pattern("[0-9]+[mMgG]?") @Description("-Xms option to to the JVM") String getXms(); void setXms(String xms); @JsonProperty("-server") @Description("-server option to to the JVM") Boolean isServer(); void setServer(Boolean server); @Description("Specifies whether the Garbage Collection logging is enabled. The default is false.") boolean isGcLoggingEnabled(); void setGcLoggingEnabled(boolean gcLoggingEnabled); @Description("A map of additional system properties which will be passed using the `-D` option to the JVM.") List<SystemProperty> getJavaSystemProperties(); void setJavaSystemProperties(List<SystemProperty> javaSystemProperties); @JsonProperty("-XX") @Description("A map of -XX options to the JVM") Map<String, String> getXx(); void setXx(Map<String, String> xx); @Override Map<String, Object> getAdditionalProperties(); @Override void setAdditionalProperty(String name, Object value);  }
@Test public void testXx() { JvmOptions opts = TestUtils.fromJson("{" + " \"-XX\":" + " {\"key1\": \"value1\"," + " \"key2\": \"value2\"," + " \"key3\": \"true\"," + " \"key4\": true," + " \"key5\": 10}" + "}", JvmOptions.class); assertThat(opts.getXx(), is(TestUtils.map("key1", "value1", "key2", "value2", "key3", "true", "key4", "true", "key5", "10"))); opts = TestUtils.fromJson("{}", JvmOptions.class); assertThat(opts.getXx(), is(nullValue())); }