@Test public void testConstructors() { RuntimeException parentException = new RuntimeException("message"); ConfigException exception = new ConfigException(ConfigException.StatusCode.CANNOT_WRITE); assertEquals(null, exception.getCause()); assertEquals(ConfigException.StatusCode.CANNOT_WRITE, exception.statusCode); exception = new ConfigException(parentException, ConfigException.StatusCode.CANNOT_WRITE); assertEquals(parentException, exception.getCause()); assertEquals(ConfigException.StatusCode.CANNOT_WRITE, exception.statusCode); }