### Question:
ActivityLogger { public void addActivityItem(final ActivityItem item) { Runnable add = new Runnable() { @Override public void run() { if (activityItems.size() >= MAX_ITEMS) { activityItems.remove(0); } activityItems.add(item); } }; if (Platform.isFxApplicationThread()) { add.run(); } else { Platform.runLater(add); } } ActivityLogger(); void addActivityItem(final ActivityItem item); ObservableList<ActivityItem> getActivityItems(); void clearActivityItems();  }### Answer:
@Test public void testAddActivityItem() { ActivityItem item = ActivityItem.create(); logger.addActivityItem(item); assertTrue(logger.getActivityItems().contains(item)); assertEquals(logger.getActivityItems().size(), 1); }