### Question:
RootMenuCollector implements Collector { @Override public boolean isCollectible(final ApplicationMenu menu) { return menu.getParentId() == null; }  @Override boolean isCollectible(final ApplicationMenu menu);  }### Answer:
@Test public void should_be_collectible_when_the_menu_has_no_parentId() { menu.setParentId(null); assertThat(collector.isCollectible(menu)).isTrue(); }
@Test public void should_not_be_collectible_when_the_menu_has_a_parentId() { menu.setParentId(3L); assertThat(collector.isCollectible(menu)).isFalse(); }