* Tests password recording.
*/
public void testRecord()
{
IPasswordsRepository repository = initModernDatabase();
PasswordAuthentication auth;
auth = repository.getAuthInformation(SAMPLE_CONTEXT_A);
assertNull("Database has no record about this context.", auth);
repository.record(SAMPLE_CONTEXT_A, SAMPLE_AUTH_INFO);
auth = repository.getAuthInformation(SAMPLE_CONTEXT_A);
assertTrue("Database has record about this context.",
Arrays.equals(SAMPLE_PASSWORD, auth.getPassword()));
assertEquals("Database has record about this context.",
SAMPLE_USERNAME, auth.getUserName());
}