@Test public void testFindByTaggableClassAndId() { List<Tag> expected = new ArrayList<>(); Tag tag1 = new Tag(); tag1.setTagText("Tag 1"); tag1.setTaggableClass(SystemCodes.class); tag1.setTaggableId(1l); Tag tag2 = new Tag(); tag2.setTagText("Tag 2"); tag2.setTaggableClass(SystemCodes.class); tag2.setTaggableId(1l); expected.add(tag1); expected.add(tag2); when(tagDao.findByTaggableClassAndId(SystemCodes.class, 1l)).thenReturn(expected); List<Tag> actual = tagService.findByTaggableClassAndId(SystemCodes.class, 1l); verify(tagDao).findByTaggableClassAndId(SystemCodes.class, 1l); assertEquals(expected, actual); }
@SuppressWarnings("rawtypes") @Override public List<Tag> findByTaggableClassAndId(Class clazz, Long id) { return getTagDao().findByTaggableClassAndId(clazz, id); }
TagServiceImpl extends BaseCrudServiceImpl<Tag> implements TagService { @SuppressWarnings("rawtypes") @Override public List<Tag> findByTaggableClassAndId(Class clazz, Long id) { return getTagDao().findByTaggableClassAndId(clazz, id); } }
TagServiceImpl extends BaseCrudServiceImpl<Tag> implements TagService { @SuppressWarnings("rawtypes") @Override public List<Tag> findByTaggableClassAndId(Class clazz, Long id) { return getTagDao().findByTaggableClassAndId(clazz, id); }  }
TagServiceImpl extends BaseCrudServiceImpl<Tag> implements TagService { @SuppressWarnings("rawtypes") @Override public List<Tag> findByTaggableClassAndId(Class clazz, Long id) { return getTagDao().findByTaggableClassAndId(clazz, id); }  @Autowired void setTagDao(TagDao tagDao); @Override List<Tag> createTags(String csTags[]); @Override void saveAllTags(Collection<Tag> tags); @SuppressWarnings("rawtypes") @Override List<Tag> findByTaggableClassAndId(Class clazz, Long id); @SuppressWarnings("rawtypes") @Override List<Tag> findByTaggableClassIdTagTexts(Class clazz, Long id,
			List<String> tags); @SuppressWarnings("rawtypes") @Override void preProcessTags(Taggable taggable, Long id, Class clazz); }
TagServiceImpl extends BaseCrudServiceImpl<Tag> implements TagService { @SuppressWarnings("rawtypes") @Override public List<Tag> findByTaggableClassAndId(Class clazz, Long id) { return getTagDao().findByTaggableClassAndId(clazz, id); }  @Autowired void setTagDao(TagDao tagDao); @Override List<Tag> createTags(String csTags[]); @Override void saveAllTags(Collection<Tag> tags); @SuppressWarnings("rawtypes") @Override List<Tag> findByTaggableClassAndId(Class clazz, Long id); @SuppressWarnings("rawtypes") @Override List<Tag> findByTaggableClassIdTagTexts(Class clazz, Long id,
			List<String> tags); @SuppressWarnings("rawtypes") @Override void preProcessTags(Taggable taggable, Long id, Class clazz);  }