### Question:
AuthenticationTokenUtils { public static boolean isUsernamePasswordToken(final AuthenticationToken token) { return token instanceof UsernamePasswordToken; } private  AuthenticationTokenUtils(); static boolean isUsernamePasswordToken(final AuthenticationToken token); static String extractUsername(final AuthenticationToken token); static String extractHostname(final AuthenticationToken token); static String generateUnsuccessfulAuthenticationMessage(final AuthenticationToken token); static String generateSuccessfulAuthenticationMessage(final AuthenticationToken token);  }### Answer:
@Test public void testIsUsernamePasswordToken() throws Exception { final AuthenticationToken nullUsernamePasswordToken = null; assertFalse(AuthenticationTokenUtils.isUsernamePasswordToken(nullUsernamePasswordToken)); final AuthenticationToken notUsernamePasswordToken = new NotUsernamePasswordToken(); assertFalse(AuthenticationTokenUtils.isUsernamePasswordToken(notUsernamePasswordToken)); final AuthenticationToken positiveUsernamePasswordToken = new UsernamePasswordToken(); assertTrue(AuthenticationTokenUtils.isUsernamePasswordToken(positiveUsernamePasswordToken)); }