AuthenticatedUserELResolver implements VariableScopeItemELResolver { @Override public boolean canResolve(String property, VariableScope variableScope) { return AUTHENTICATED_USER_KEY.equals(property); }  @Override boolean canResolve(String property, VariableScope variableScope); @Override Object resolve(String property, VariableScope variableScope);  }
@Test public void canResolve_should_returnTrueWhenPropertyIsAuthenticatedUser() { boolean canResolve = resolver.canResolve(AUTHENTICATED_USER_KEY, mock(VariableScope.class)); assertThat(canResolve).isTrue(); }
@Test public void canResolve_should_returnFalseWhenPropertyIsNotAuthenticatedUser() { boolean canResolve = resolver.canResolve("anyOtherProperty", mock(VariableScope.class)); assertThat(canResolve).isFalse(); }