class AuthenticationResourceImpl implements AuthenticationResource {
    @Autowired
    private Environment environment;

    @Override
    public AuthenticationEntity authenticate(UserEntity userEntity) {<FILL_FUNCTION_BODY>}
}

        AuthenticationEntity authenticationEntity = new AuthenticationEntity();

        String userId = userEntity.getUserId().trim();
        String password = userEntity.getPassword().trim();

        String passwordValue = environment.getProperty(userId);
        if (StringUtils.isNotEmpty(passwordValue)) {
            if (StringUtils.equals(password, passwordValue)) {
                authenticationEntity.setPassed(true);
            } else {
                authenticationEntity.setError("Password is mismatched");
            }
        } else {
            authenticationEntity.setError("Account doesn't exist");
        }

        return authenticationEntity;
    
<no_super_class>