test_class.declarator: VALID_USERNAME = "user"
test_class.modifier: private static final
test_class.original_string: private static final String VALID_USERNAME = "user";
test_class.type: String
test_class.var_name: VALID_USERNAME
test_class.declarator: VALID_PASSWORD = "password"
test_class.modifier: private static final
test_class.original_string: private static final String VALID_PASSWORD = "password";
test_class.type: String
test_class.var_name: VALID_PASSWORD
test_class.declarator: INVALID_PASSWORD = "invalid_password"
test_class.modifier: private static final
test_class.original_string: private static final String INVALID_PASSWORD = "invalid_password";
test_class.type: String
test_class.var_name: INVALID_PASSWORD
test_class.declarator: mockUserService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UserService mockUserService;
test_class.type: UserService
test_class.var_name: mockUserService
test_class.declarator: mockDateTimeService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DateTimeService mockDateTimeService;
test_class.type: DateTimeService
test_class.var_name: mockDateTimeService
test_class.declarator: defaultAuthenticationService
test_class.modifier: private
test_class.original_string: private DefaultAuthenticationService defaultAuthenticationService;
test_class.type: DefaultAuthenticationService
test_class.var_name: defaultAuthenticationService
test_class.file: application/confagrid-webapp/src/test/java/com/aleggeup/confagrid/auth/DefaultAuthenticationServiceTest.java
test_class.identifier: DefaultAuthenticationServiceTest
test_case.body: @Test
      public void testUserCheckInvalidPassword() {
          final UserEntity userEntity = new UserEntity();
          userEntity.setPassword(VALID_PASSWORD);
  
          Mockito.when(mockUserService.findByName(VALID_USERNAME)).thenReturn(userEntity);
          Mockito.when(mockUserService.matches(INVALID_PASSWORD, VALID_PASSWORD)).thenReturn(false);
  
          Assert.assertFalse(defaultAuthenticationService.userPasswordCheck(VALID_USERNAME, INVALID_PASSWORD));
  
          Mockito.verify(mockUserService).findByName(VALID_USERNAME);
          Mockito.verify(mockUserService).matches(INVALID_PASSWORD, VALID_PASSWORD);
      }
test_case.class_method_signature: DefaultAuthenticationServiceTest.testUserCheckInvalidPassword()
test_case.full_signature: @Test public void testUserCheckInvalidPassword()
test_case.identifier: testUserCheckInvalidPassword
test_case.invocations: setPassword thenReturn when findByName thenReturn when matches assertFalse userPasswordCheck findByName verify matches verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUserCheckInvalidPassword()
focal_class.declarator: TOKEN_INTERVAL_DAYS = 1
focal_class.modifier: private static final
focal_class.original_string: private static final int TOKEN_INTERVAL_DAYS = 1;
focal_class.type: int
focal_class.var_name: TOKEN_INTERVAL_DAYS
focal_class.declarator: userService
focal_class.modifier: private final
focal_class.original_string: private final UserService userService;
focal_class.type: UserService
focal_class.var_name: userService
focal_class.declarator: dateTimeService
focal_class.modifier: private final
focal_class.original_string: private final DateTimeService dateTimeService;
focal_class.type: DateTimeService
focal_class.var_name: dateTimeService
focal_class.file: application/confagrid-webapp/src/main/java/com/aleggeup/confagrid/auth/DefaultAuthenticationService.java
focal_class.identifier: DefaultAuthenticationService
focal_class.interfaces: implements AuthenticationService
focal_class.class_method_signature: DefaultAuthenticationService.DefaultAuthenticationService(final UserService userService, final DateTimeService dateTimeService)
focal_class.full_signature: @Autowired public  DefaultAuthenticationService(final UserService userService, final DateTimeService dateTimeService)
focal_class.identifier: DefaultAuthenticationService
focal_class.modifiers: @Autowired public
focal_class.parameters: (final UserService userService, final DateTimeService dateTimeService)
focal_class.signature:  DefaultAuthenticationService(final UserService userService, final DateTimeService dateTimeService)
focal_class.class_method_signature: DefaultAuthenticationService.userPasswordCheck(final String username, final String password)
focal_class.full_signature: @Override public boolean userPasswordCheck(final String username, final String password)
focal_class.identifier: userPasswordCheck
focal_class.modifiers: @Override public
focal_class.parameters: (final String username, final String password)
focal_class.return: boolean
focal_class.signature: boolean userPasswordCheck(final String username, final String password)
focal_class.class_method_signature: DefaultAuthenticationService.authenticationToken(final String username, final String password)
focal_class.full_signature: @Override public String authenticationToken(final String username, final String password)
focal_class.identifier: authenticationToken
focal_class.modifiers: @Override public
focal_class.parameters: (final String username, final String password)
focal_class.return: String
focal_class.signature: String authenticationToken(final String username, final String password)
focal_class.class_method_signature: DefaultAuthenticationService.anonymousToken()
focal_class.full_signature: @Override public String anonymousToken()
focal_class.identifier: anonymousToken
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String anonymousToken()
focal_method.body: @Override
      public boolean userPasswordCheck(final String username, final String password) {
          final UserEntity userEntity = userService.findByName(username);
  
          return userEntity != null && userService.matches(password, userEntity.getPassword());
      }
focal_method.class_method_signature: DefaultAuthenticationService.userPasswordCheck(final String username, final String password)
focal_method.full_signature: @Override public boolean userPasswordCheck(final String username, final String password)
focal_method.identifier: userPasswordCheck
focal_method.invocations: findByName matches getPassword
focal_method.modifiers: @Override public
focal_method.parameters: (final String username, final String password)
focal_method.return: boolean
focal_method.signature: boolean userPasswordCheck(final String username, final String password)