AuthenticatedUserELResolver implements VariableScopeItemELResolver { @Override public Object resolve(String property, VariableScope variableScope) { return Authentication.getAuthenticatedUserId(); }  @Override boolean canResolve(String property, VariableScope variableScope); @Override Object resolve(String property, VariableScope variableScope);  }
@Test public void resolve_should_returnAuthenticatedUser() { Authentication.setAuthenticatedUserId("jane"); Object result = resolver.resolve(AUTHENTICATED_USER_KEY, mock(VariableScope.class)); assertThat(result).isEqualTo("jane"); }