@Test
public void testResolveScreenNameNameId() throws Exception {

	when(
		_beanProperties.getObject(
			Mockito.any(User.class), Mockito.eq("screenName"))
	).thenReturn(
		"test"
	);
	when(
		_metadataManager.getNameIdAttribute(Mockito.eq(SP_ENTITY_ID))
	).thenReturn(
		"screenName"
	);
	when(
		_metadataManager.getNameIdFormat(Mockito.eq(SP_ENTITY_ID))
	).thenReturn(
		NameID.ENTITY.toString()
	);
	String nameId = _defaultNameIdResolver.resolve(
		_user, SP_ENTITY_ID, null, null, false, null);
	Assert.assertNotNull(nameId);
	Assert.assertEquals("test", nameId);
}