EmbeddedUserService implements UserService { @Override public boolean matches(final String raw, final String encoded) { return passwordEncoder.matches(raw, encoded); } @Autowired  EmbeddedUserService(final UserRepository userRepository, final SecureRandom secureRandom); @Override void save(final UserEntity userEntity); @Override UserEntity getById(final UUID key); @Override boolean containsKey(final UUID key); @Override boolean containsName(final String name); @Override UserEntity findByName(final String name); @Override String encrypt(final String raw); @Override boolean matches(final String raw, final String encoded); @Override long count();  }
@Test public void testMatches() { assertTrue(userService.matches(UNENCRYPTED_PASSWORD, ENCRYPTED_PASSWORD)); }