@Test
  public void testGetErrorCode_multipleErrors() {
    Mockito.when(responseException.getContent())
        .thenReturn(
            "{\"errors\":["
                + "{\"code\":\"MANIFEST_INVALID\",\"message\":\"message 1\",\"detail\":{}},"
                + "{\"code\":\"TAG_INVALID\",\"message\":\"message 2\",\"detail\":{}}"
                + "]}");
    try {
      ErrorResponseUtil.getErrorCode(responseException);
      Assert.fail();
    } catch (ResponseException ex) {
      Assert.assertSame(responseException, ex);
    }
  }
Multiple error objects should cause original exception to be rethrown.
jib-core/src/test/java/com/google/cloud/tools/jib/registry/ErrorResponseUtilTest.java