assertTrue(authenticated.getPrincipal() instanceof WindowsPrincipal);
}
@Test(expected = GuestLoginDisabledAuthenticationException.class)
public void testGuestIsDisabled() {
MockWindowsIdentity mockIdentity = new MockWindowsIdentity("Guest", new ArrayList<String>());
this.provider.setAllowGuestLogin(false);
WindowsPrincipal principal = new WindowsPrincipal(mockIdentity);
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(principal,
"password");
this.provider.authenticate(authentication);