### Question:
XMLUserDatabase extends AbstractUserDatabase { @Override public UserProfile findByLoginName( final String index ) throws NoSuchPrincipalException { return findBy( LOGIN_NAME, index ); }  @Override synchronized void deleteByLoginName( final String loginName ); @Override UserProfile findByEmail( final String index ); @Override UserProfile findByFullName( final String index ); @Override UserProfile findByLoginName( final String index ); @Override UserProfile findByUid( final String uid ); @Override UserProfile findByWikiName( final String index ); UserProfile findBy( final String attr, final String value ); @Override Principal[] getWikiNames(); @Override void initialize( final Engine engine, final Properties props ); @Override synchronized void rename( final String loginName, final String newName); @Override synchronized void save( final UserProfile profile ); static final String PROP_USERDATABASE; }### Answer:
@Test public void testFindByLoginName() { try { UserProfile profile = m_db.findByLoginName( "janne" ); Assertions.assertEquals( "-7739839977499061014", profile.getUid() ); Assertions.assertEquals( "janne", profile.getLoginName() ); Assertions.assertEquals( "Janne Jalkanen", profile.getFullname() ); Assertions.assertEquals( "JanneJalkanen", profile.getWikiName() ); Assertions.assertEquals( "{SSHA}1WFv9OV11pD5IySgVH3sFa2VlCyYjbLrcVT/qw==", profile.getPassword() ); Assertions.assertEquals( "janne@ecyrd.com", profile.getEmail() ); } catch( NoSuchPrincipalException e ) { Assertions.assertTrue( false ); } try { m_db.findByEmail( "FooBar" ); Assertions.assertTrue( false ); } catch( NoSuchPrincipalException e ) { Assertions.assertTrue( true ); } }