FunctionContextArgumentProvider { static String getMember(FunctionContext<?> context) { return getMemberFromContext(context); }    }
@Test public void getMemberReturnsMemberNameInsteadOfId() { when(distributedMember.getId()).thenReturn("myId"); when(distributedMember.getName()).thenReturn("myName"); String member = FunctionContextArgumentProvider.getMember(context); assertThat(member).isEqualTo("myName"); }
@Test public void getMemberReturnsMemberIdIfNameIsMissing() { when(distributedMember.getId()).thenReturn("myId"); String member = FunctionContextArgumentProvider.getMember(context); assertThat(member).isEqualTo("myId"); }