@Test
public void testClearLog() {

  user.addLogMessage("log");
  List log = user.getLogMessages();
  user.clearLog();
  
  Assert.assertTrue("retrieved log does not have a single message",
             log.size() == 1);
  Assert.assertTrue("retrieved log message is not 'log': " + log,
             log.get(0).equals("log"));
  log = user.getLogMessages();
  Assert.assertTrue("cleared log is not empty",
             log.isEmpty());
  
}