### Question:
Configuration { public static com.typesafe.config.Config getByFileName(final String shellConfFileName, final String confFileName) { if (isNoneBlank(shellConfFileName)) { File shellConfFile = new File(shellConfFileName); resolveConfigFile(shellConfFileName, shellConfFile); return config; } if (isBlank(confFileName)) { throw new IllegalArgumentException("Configuration path is required!"); } else { File confFile = new File(confFileName); resolveConfigFile(confFileName, confFile); return config; } }  static com.typesafe.config.Config getByFileName(final String shellConfFileName,
      final String confFileName);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void whenNullPathGetShouldThrowIllegalArgumentException() { Configuration.getByFileName(null, null); }
@Test(expected = IllegalArgumentException.class) public void whenEmptyPathGetShouldThrowIllegalArgumentException() { Configuration.getByFileName(StringUtils.EMPTY, StringUtils.EMPTY); }
@Test(expected = IllegalArgumentException.class) public void getShouldNotFindConfiguration() { Config config = Configuration.getByFileName("notExistingPath", "notExistingPath"); assertFalse(config.hasPath("storage")); assertFalse(config.hasPath("overlay")); assertFalse(config.hasPath("seed.node")); assertFalse(config.hasPath("genesis.block")); }
@Test public void getShouldReturnConfiguration() { Config config = Configuration.getByFileName(Constant.TEST_CONF, Constant.TEST_CONF); assertTrue(config.hasPath("storage")); assertTrue(config.hasPath("seed.node")); assertTrue(config.hasPath("genesis.block")); }
@Test public void getConfigurationWhenOnlyConfFileName() { URL res = getClass().getClassLoader().getResource(Constant.TEST_CONF); Config config = Configuration.getByFileName("", res.getPath()); assertTrue(config.hasPath("storage")); assertTrue(config.hasPath("seed.node")); assertTrue(config.hasPath("genesis.block")); }