### Question:
MetadataClientRequestProcessor extends MessageProcessorBase { public boolean canProcess() { switch (target) { case LIST_CLIENTS: case LIST_CENTRAL_SERVICES: return true; default: return false; } } MetadataClientRequestProcessor(String target,
            HttpServletRequest request, HttpServletResponse response); boolean canProcess(); @Override void process(); @Override MessageInfo createRequestMessageInfo();  }### Answer:
@Test public void shouldBeAbleToProcessListClients() { MetadataClientRequestProcessor processorToTest = new MetadataClientRequestProcessor(LIST_CLIENTS, mockRequest, mockResponse); assertTrue("Wasn't able to process list clients", processorToTest.canProcess()); }
@Test public void shouldBeAbleToProcessListCentralServices() { MetadataClientRequestProcessor processorToTest = new MetadataClientRequestProcessor(LIST_CENTRAL_SERVICES, mockRequest, mockResponse); assertTrue("Wasn't able to process central services", processorToTest.canProcess()); }
@Test public void shouldNotBeAbleToProcessRandomRequest() { MetadataClientRequestProcessor processorToTest = new MetadataClientRequestProcessor("getRandom", mockRequest, mockResponse); assertFalse("Was able to process a random target", processorToTest.canProcess()); }