@Test
public void testAuthenticate() {
MockWindowsIdentity mockIdentity = new MockWindowsIdentity(WindowsAccountImpl.getCurrentUsername(),
new ArrayList<String>());
WindowsPrincipal principal = new WindowsPrincipal(mockIdentity);
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(principal,
"password");
Authentication authenticated = this.provider.authenticate(authentication);
assertNotNull(authenticated);
assertTrue(authenticated.isAuthenticated());
GrantedAuthority[] authorities = authenticated.getAuthorities();