class UserModelDataMapper {

  public UserModel transform(User user) {
    if (user == null) {
      throw new IllegalArgumentException("Cannot transform a null value");
    }
    UserModel userModel = new UserModel(user.getUserId());
    userModel.setFullName(user.getFullName());

    return userModel;
  }

}

class UserModelDataMapperTest  {

    private static final int FAKE_USER_ID;
    private static final String FAKE_FULLNAME;
    private UserModelDataMapper userModelDataMapper;

    @Test
    public void testTransformUserCollection() {

        User mockUserOne = mock(User.class);
        User mockUserTwo = mock(User.class);

        List<User> userList = new ArrayList<>(5);
        userList.add(mockUserOne);
        userList.add(mockUserTwo);

        Collection<UserModel> userModelList = userModelDataMapper.transform(userList);

        assertThat(userModelList.toArray()[0], is(instanceOf(UserModel.class)));
        assertThat(userModelList.toArray()[1], is(instanceOf(UserModel.class)));
        assertThat(userModelList.size(), is(2));
    }

}