### Question:
JDBCUserDatabase extends AbstractUserDatabase { @Override public UserProfile findByEmail( final String index ) throws NoSuchPrincipalException { return findByPreparedStatement( m_findByEmail, index ); }  @Override 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 ); @Override Principal[] getWikiNames(); @Override void initialize( final Engine engine, final Properties props ); @Override void rename( final String loginName, final String newName ); @Override void save( final UserProfile profile ); static final String DEFAULT_DB_ATTRIBUTES; static final String DEFAULT_DB_CREATED; static final String DEFAULT_DB_EMAIL; static final String DEFAULT_DB_FULL_NAME; static final String DEFAULT_DB_JNDI_NAME; static final String DEFAULT_DB_LOCK_EXPIRY; static final String DEFAULT_DB_MODIFIED; static final String DEFAULT_DB_ROLE; static final String DEFAULT_DB_ROLE_TABLE; static final String DEFAULT_DB_TABLE; static final String DEFAULT_DB_LOGIN_NAME; static final String DEFAULT_DB_PASSWORD; static final String DEFAULT_DB_UID; static final String DEFAULT_DB_WIKI_NAME; static final String PROP_DB_ATTRIBUTES; static final String PROP_DB_CREATED; static final String PROP_DB_EMAIL; static final String PROP_DB_FULL_NAME; static final String PROP_DB_DATASOURCE; static final String PROP_DB_LOCK_EXPIRY; static final String PROP_DB_LOGIN_NAME; static final String PROP_DB_MODIFIED; static final String PROP_DB_PASSWORD; static final String PROP_DB_UID; static final String PROP_DB_ROLE; static final String PROP_DB_ROLE_TABLE; static final String PROP_DB_TABLE; static final String PROP_DB_WIKI_NAME; }### Answer:
@Test public void testFindByEmail() { try { UserProfile profile = m_db.findByEmail( "janne@ecyrd.com" ); Assertions.assertEquals( "-7739839977499061014", profile.getUid() ); Assertions.assertEquals( "janne", profile.getLoginName() ); Assertions.assertEquals( "Janne Jalkanen", profile.getFullname() ); Assertions.assertEquals( "JanneJalkanen", profile.getWikiName() ); Assertions.assertEquals( "{SHA}457b08e825da547c3b77fbc1ff906a1d00a7daee", profile.getPassword() ); Assertions.assertEquals( "janne@ecyrd.com", profile.getEmail() ); Assertions.assertNotNull( profile.getCreated() ); Assertions.assertNull( profile.getLastModified() ); } catch( NoSuchPrincipalException e ) { Assertions.assertTrue( false ); } try { m_db.findByEmail( "foo@bar.org" ); Assertions.assertTrue( false ); } catch( NoSuchPrincipalException e ) { Assertions.assertTrue( true ); } }