### Question:
TagServiceImpl implements TagService { @Override public long getNrOfTags() { return tagDao.count(); }  @Override Page<Tag> getAllTag(); @Override Page<Tag> getTag(int skip, int count, Order... order); @Override Page<Tag> getTag(Pageable page); @Override @Transactional(readOnly = false) Tag save(Tag tag); @Override Tag read(Long tagId); @Override @Transactional(readOnly = false) void delete(Long tagId); @Override long getNrOfTags(); @Override List<Post> getPostingSelectOptions();  }### Answer:
@SuppressWarnings("boxing") @Test public void testNrOfTags() { final long nrOfTag = 10; when(tagDao.count()).thenReturn(nrOfTag); long testValue = tagService.getNrOfTags(); verify(tagDao, times(1)).count(); assertThat(testValue).isEqualTo(nrOfTag); }