Person p = new FieldRestrictingPerson(getTestPerson(), new HashSet<String>());
assertThat(p.getPreferredUsername(), is(equalTo(USERNAME)));
}
@Test
public void getUsername_valid() {
Person p = new FieldRestrictingPerson(getTestPerson(), getFieldSet(Person.Field.PREFERRED_USERNAME));
assertThat(p.getPreferredUsername(), is(equalTo(USERNAME)));
}