@Test
  public void testGetErrorCode_unknownErrorCode() {
    Mockito.when(responseException.getContent())
        .thenReturn(
            "{\"errors\":[{\"code\":\"INVALID_ERROR_CODE\",\"message\":\"invalid code\",\"detail\":{}}]}");
    try {
      ErrorResponseUtil.getErrorCode(responseException);
      Assert.fail();
    } catch (ResponseException ex) {
      Assert.assertSame(responseException, ex);
    }
  }
An unknown {@link ErrorCodes} should cause original exception to be rethrown.
jib-core/src/test/java/com/google/cloud/tools/jib/registry/ErrorResponseUtilTest.java