ItemServiceImpl implements ItemService { @Override public boolean addItem(Item item) { return itemRepository.save(item) != null; }  @Override boolean addItem(Item item); @Override List<Item> getItems();  }
@Test public void testAddItem() { Mockito.when(itemRepository.save(Matchers.any(Item.class))).thenReturn(new Item()); assertThat(itemService.addItem(new Item())).isTrue(); }