### Question:
ResponderImpl implements Responder { @Override public void sendWBXMLResponse(String defaultNamespace, Document doc) { logger.debug("response: send response"); domDumper.dumpXml(doc, WBXMLTools.XML_SERIALIZING_VERSION); try { byte[] wbxml = wbxmlTools.toWbxml(defaultNamespace, doc); writeData(wbxml, contentType); } catch (WBXmlException e) { logger.error(e.getMessage(), e); } catch (IOException e) { logger.warn(e.getMessage(), e); } } ResponderImpl(String contentType, HttpServletResponse resp, IntEncoder intEncoder, WBXMLTools wbxmlTools, 
			DOMDumper domDumper); @Override void sendWBXMLResponse(String defaultNamespace, Document doc); @Override void sendXMLResponse(String defaultNamespace, Document doc); @Override void sendResponseFile(String contentType, InputStream file); void sendMSSyncMultipartResponse(String defaultNamespace,
			Document doc, Collection<byte[]> files, boolean gzip); @Override void sendError(int statusCode); @Override void sendNoChangeResponse();  }### Answer:
@Test(expected=NullPointerException.class) public void testSendResponseNullData() throws Throwable { String namespace = "myNamespace"; byte[] data = null; HttpServletResponse servletResponse = EasyMock.createMock(HttpServletResponse.class); String contentType = "application/vnd.ms-sync"; servletResponse.setContentType(contentType); IntEncoder intEncoder = EasyMock.createMock(IntEncoder.class); WBXMLTools wbxmlTools = EasyMock.createMock(WBXMLTools.class); Document document = EasyMock.createMock(Document.class); DOMDumper domDumper = EasyMock.createMock(DOMDumper.class); EasyMock.expect(wbxmlTools.toWbxml(namespace, document)).andReturn(data); EasyMock.replay(servletResponse, intEncoder, wbxmlTools, document); ResponderImpl responder = new ResponderImpl(contentType, servletResponse, intEncoder, wbxmlTools, domDumper); try { responder.sendWBXMLResponse(namespace, document); } catch (Throwable t) { EasyMock.verify(servletResponse, intEncoder, wbxmlTools, document); throw t; } }