### Question:
UnauthorizedErrorResponse implements EscrowAgentErrorResponse { @Override public EscrowAgentErrorResponseException getErrorResponseException( final String errorResponse) { if (errorResponse.split("authentication_error=").length == 2) return new UnverifiedRequestException( errorResponse.split("authentication_error=")[1]); if (errorResponse.split("key_error=").length == 2) return new UnretrievableKeyException( errorResponse.split("key_error=")[1]); if (errorResponse.split("authorization_error=").length == 2) return new AccessDeniedException( errorResponse.split("authorization_error=")[1]); return new EscrowAgentErrorResponseException(MESSAGE + " Status code: " + STATUS_CODE); }  @Override EscrowAgentErrorResponseException getErrorResponseException(
            final String errorResponse); static final int STATUS_CODE; }### Answer:
@Test(expected = AccessDeniedException.class) public void testAccessDeniedException() throws EscrowAgentErrorResponseException { EscrowAgentErrorResponseException ex = new UnauthorizedErrorResponse() .getErrorResponseException("authorization_error=failed"); Assert.assertEquals(ex.getMessage(), "failed"); throw ex; }
@Test(expected = UnverifiedRequestException.class) public void testUnverifiedRequestException() throws EscrowAgentErrorResponseException { EscrowAgentErrorResponseException ex = new UnauthorizedErrorResponse() .getErrorResponseException("authentication_error=failed"); Assert.assertEquals(ex.getMessage(), "failed"); throw ex; }
@Test(expected = EscrowAgentErrorResponseException.class) public void testEscowAgentErrorResponse() throws EscrowAgentErrorResponseException { EscrowAgentErrorResponseException ex = new UnauthorizedErrorResponse() .getErrorResponseException("error=error"); throw ex; }