@Test
void testMissingParameters()
{

  // both parameters null with POST
  RequestHandler requestHandler = new RequestHandler(mockSessionStore, mockConfigHolder,
                                                     mockServiceProviderConfig);
  RequestProcessingException requestProcessingException = Assertions.assertThrows(RequestProcessingException.class,
                                                                                  () -> requestHandler.handleSAMLRequest(null,
                                                                                                                         null,
                                                                                                                         true));
  Assertions.assertEquals(requestProcessingException.getCause().getClass(), ErrorCodeException.class);
  // both parameters null with GET
  requestProcessingException = Assertions.assertThrows(RequestProcessingException.class,
                                                       () -> requestHandler.handleSAMLRequest(null,
                                                                                              null,
                                                                                              false));
  Assertions.assertEquals(requestProcessingException.getCause().getClass(), ErrorCodeException.class);
  // saml request null with POST
  requestProcessingException = Assertions.assertThrows(RequestProcessingException.class,
                                                       () -> requestHandler.handleSAMLRequest(RELAY_STATE,
                                                                                              null,
                                                                                              true));
  Assertions.assertEquals(requestProcessingException.getCause().getClass(), ErrorCodeException.class);
  // saml request null with GET
  requestProcessingException = Assertions.assertThrows(RequestProcessingException.class,
                                                       () -> requestHandler.handleSAMLRequest(RELAY_STATE,
                                                                                              null,
                                                                                              false));
  Assertions.assertEquals(requestProcessingException.getCause().getClass(), ErrorCodeException.class);
  // both parameters emtpy String with POST
  requestProcessingException = Assertions.assertThrows(RequestProcessingException.class,
                                                       () -> requestHandler.handleSAMLRequest("",
                                                                                              "",
                                                                                              true));
  Assertions.assertEquals(requestProcessingException.getCause().getClass(), SAXParseException.class);
  // both parameters emtpy String with GET
  requestProcessingException = Assertions.assertThrows(RequestProcessingException.class,
                                                       () -> requestHandler.handleSAMLRequest("",
                                                                                              "",
                                                                                              false));
  Assertions.assertEquals(requestProcessingException.getCause().getClass(), SAXParseException.class);
  // saml request emtpy String with POST
  requestProcessingException = Assertions.assertThrows(RequestProcessingException.class,
                                                       () -> requestHandler.handleSAMLRequest(RELAY_STATE,
                                                                                              "",
                                                                                              true));
  Assertions.assertEquals(requestProcessingException.getCause().getClass(), SAXParseException.class);
  // saml request emtpy String with GET
  requestProcessingException = Assertions.assertThrows(RequestProcessingException.class,
                                                       () -> requestHandler.handleSAMLRequest(RELAY_STATE,
                                                                                              "",
                                                                                              false));
  Assertions.assertEquals(requestProcessingException.getCause().getClass(), SAXParseException.class);
}