### Question:
APISettings { public static APISettings create(Config config) { if (config.hasPath(API_PATH)) { config = config.getConfig(API_PATH); } int port = checkPort(config.getInt(PORT_INT_PARAM)); int securePort = checkPort(config.getInt(SECURE_PORT_INT_PARAM)); String host = checkHost(config.getString(HOST_STR_PARAM)); return new APISettings(host, port, securePort, config); } private  APISettings(String host, int port, int securePort, Config config); static APISettings create(Config config); String getHost(); int getPort(); int getSecurePort(); boolean isSecure(); File getKeystoreFile(); String getKeystorePassword(); String getUserName(); String getPassword();  }### Answer:
@Test(expected = ConfigException.Null.class) public void testDefaultConfig() { Config generic = ConfigUtils.getDefaultConfig().getConfig("generic-api"); APISettings.create(generic); }
@Test public void testServingLayerDefaults() { assertNotNull(APISettings.create( ConfigUtils.getDefaultConfig().getConfig("serving-layer.api"))); }
@Test public void testComputationLayerDefaults() { assertNotNull(APISettings.create( ConfigUtils.getDefaultConfig().getConfig("computation-layer.api"))); }