@Test public void testUserNameUsingFirstName() { final String firstName = "Mock"; when(user.getProperty(User.StandardUserProperties.FIRST_NAME)).thenReturn(firstName); userMenu.setup(); verify(userMenuView).setUserName(firstName); }
@Test public void testUserNameUsingLastName() { final String lastName = "Test"; when(user.getProperty(User.StandardUserProperties.LAST_NAME)).thenReturn(lastName); userMenu.setup(); verify(userMenuView).setUserName(lastName); }
@Test public void testUserNameWithId() { final String userName = "******"; when(user.getIdentifier()).thenReturn(userName); userMenu.setup(); verify(userMenuView).setUserName(userName); }