@Before
  public void setUp() {
    initMocks(this);
    when(credentials.getRequest()).thenReturn(request);

    provider = new HttpHeaderPrincipalProvider();
  }
  @Test
  public void testNoRequest() {

    provider.setHeaderName("Groups");
    provider.setSeparator(",");

    when(credentials.getRequest()).thenReturn(null);

    final Set<Principal> principals = provider.getPrincipals(credentials);

    assertTrue("Empty set expected when no request supplied", principals.isEmpty());
  }