@Test public void testLogs() throws Exception { final String entryId = "abcd"; Map<String, Integer> entry = ImmutableMap.of("a", 1); Map<String, Integer> status = ImmutableMap.of("count", 42); handler.insert(entryId, DateTimes.of("2014-01-01"), "test", entry, true, status); Assert.assertEquals( ImmutableList.of(), handler.getLogs("non_exist_entry") ); Assert.assertEquals( ImmutableMap.of(), handler.getLocks(entryId) ); final ImmutableMap<String, String> log1 = ImmutableMap.of("logentry", "created"); final ImmutableMap<String, String> log2 = ImmutableMap.of("logentry", "updated"); Assert.assertTrue(handler.addLog(entryId, log1)); Assert.assertTrue(handler.addLog(entryId, log2)); Assert.assertEquals( ImmutableList.of(log1, log2), handler.getLogs(entryId) ); }