NvaDaemonConfiguration { public static NvaDaemonConfiguration parseConfig(Reader reader) throws ConfigurationException { Preconditions.checkNotNull(reader, "reader cannot be null"); try { ObjectMapper mapper = new ObjectMapper() .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); NvaDaemonConfiguration configuration = mapper.readValue(reader, NvaDaemonConfiguration.class); return configuration; } catch (IOException ioe) { throw new ConfigurationException("Error reading configuration", ioe); } } @JsonCreator  NvaDaemonConfiguration(@JsonProperty("zookeeper")ZookeeperConfiguration zookeeperConfiguration,
                                  @JsonProperty("daemon")DaemonConfiguration daemonConfiguration); ZookeeperConfiguration getZookeeperConfiguration(); DaemonConfiguration getDaemonConfiguration(); static NvaDaemonConfiguration parseConfig(Reader reader);  }
@Test void test_invalid_reader() { try (StringReader reader = new StringReader("")) { Assertions.assertThrows(ConfigurationException.class, () -> NvaDaemonConfiguration.parseConfig(reader)); } }
@Test void test_null_reader() { Assertions.assertThrows(NullPointerException.class, () -> NvaDaemonConfiguration.parseConfig(null)); }