### Question:
StandardErrorUnmarshaller extends AbstractErrorUnmarshaller<Node> { @Override public AmazonServiceException unmarshall(Node in) throws Exception { String errorCode = parseErrorCode(in); String errorType = XpathUtils.asString("ErrorResponse/Error/Type", in); String requestId = XpathUtils.asString("ErrorResponse/RequestId", in); String message = XpathUtils.asString("ErrorResponse/Error/Message", in); AmazonServiceException ase = newException(message); ase.setErrorCode(errorCode); ase.setRequestId(requestId); if (errorType == null) { ase.setErrorType(ErrorType.Unknown); } else if ("Receiver".equalsIgnoreCase(errorType)) { ase.setErrorType(ErrorType.Service); } else if ("Sender".equalsIgnoreCase(errorType)) { ase.setErrorType(ErrorType.Client); } return ase; } StandardErrorUnmarshaller(); protected  StandardErrorUnmarshaller(Class<? extends AmazonServiceException> exceptionClass); @Override AmazonServiceException unmarshall(Node in); String parseErrorCode(Node in); String getErrorPropertyPath(String property);  }### Answer:
@Test public void testUnmarshall() throws TransformerFactoryConfigurationError, Exception { Document xmlDoc = new DocumentImpl(); Element root = xmlDoc.createElement("ErrorResponse"); Element requestId = xmlDoc.createElement("RequestId"); requestId.appendChild(xmlDoc.createTextNode("TestId")); Element error = xmlDoc.createElement("Error"); Element message = xmlDoc.createElement("Message"); message.appendChild(xmlDoc.createTextNode("TestMessage")); Element type = xmlDoc.createElement("Type"); type.appendChild(xmlDoc.createTextNode("Receiver")); error.appendChild(message); error.appendChild(type); root.appendChild(error); root.appendChild(requestId); xmlDoc.appendChild(root); StandardErrorUnmarshaller seu = new StandardErrorUnmarshaller(); AmazonServiceException ase = seu.unmarshall(xmlDoc); assertEquals(ase.getErrorMessage(), "TestMessage"); assertEquals(ase.getErrorType(), ErrorType.Service); assertEquals(ase.getRequestId(), "TestId"); Element code = xmlDoc.createElement("Code"); code.appendChild(xmlDoc.createTextNode("TestCode")); }