### Question:
Registration { public String checkUserByPassword(String id, String password) { return checkUser(id, Hash.getCode(id, password)); } Registration(ConnectionThreadPoolFactory factory, String adminEmail, String adminPassword, PasswordEncoder passwordEncoder, ConfigProperties properties, boolean initAdminUser); boolean approved(String id); boolean registered(String id); User getOrRegister(String id, String email, String readableName); User registerApproved(String id, String email, String readableName); User register(String id, String email, String readableName, String password, String data, Collection<String> roles); String login(String id, String password); String checkUser(String id); String checkUser(String id, String code); String checkUserByPassword(String id, String password); String getIdByCode(String code); boolean emailIsUsed(String email); boolean nameIsUsed(String name); String getEmailById(String id); String getIdByName(String name); String getIdByEmail(String email); String getNameById(String id); String getCodeById(String id); void approve(String code); void updateReadableName(String id, String name); void updateId(String name, String id); void updateNameAndEmail(String id, String name, String email); User getUserByCode(String code); Optional<User> getUserByEmail(String email); Optional<User> getUserById(String id); List<User> getUsers(); void replace(User user); void remove(String id); void removeAll(); static final int ADMIN_USER_ID; }### Answer:
@Test public void shouldCheckUserByPassword_badIdAndPassword() { String id = "bad_id"; String password = "bad_password"; String actualId = service.checkUserByPassword(id, password); assertEquals(true, StringUtils.isEmpty(actualId)); }