### Question:
SAMLProcessorImpl implements SAMLProcessor { protected SAMLBinding getBinding(InTransport transport) throws SAMLException { for (SAMLBinding binding : bindings) { if (binding.supports(transport)) { return binding; } } throw new SAMLException("Unsupported request"); } SAMLProcessorImpl(SAMLBinding binding);  SAMLProcessorImpl(Collection<SAMLBinding> bindings); SAMLMessageContext retrieveMessage(SAMLMessageContext samlContext, SAMLBinding binding); SAMLMessageContext retrieveMessage(SAMLMessageContext samlContext, String binding); SAMLMessageContext retrieveMessage(SAMLMessageContext samlContext); SAMLMessageContext sendMessage(SAMLMessageContext samlContext, boolean sign); SAMLMessageContext sendMessage(SAMLMessageContext samlContext, boolean sign, String bindingName);  }### Answer:
@Test public void testGETDecoder() throws Exception { prepareHttpRequest("message/SAMLResponse.xml", "GET", "http: replayMock(); MessageDecoder decoder = processor.getBinding(new HttpServletRequestAdapter(request)).getMessageDecoder(); verifyMock(); assertNotNull(decoder); }
@Test(expected = SAMLException.class) public void testUnknownDecoder() throws Exception { prepareHttpRequest("message/SAMLResponse.xml", "HEAD", "http: replayMock(); MessageDecoder decoder = processor.getBinding(new HttpServletRequestAdapter(request)).getMessageDecoder(); verifyMock(); assertNotNull(decoder); }