### Question:
TransactionalTypeAwarePluginTopicService implements TypeAwarePluginTopicService { public Topic get(Long id, String type) throws NotFoundException { Topic topic = topicFetchService.get(id); if (!topic.getType().equals(type)) { throw new NotFoundException(); } return topic; } private  TransactionalTypeAwarePluginTopicService(); static TypeAwarePluginTopicService getInstance(); void setTopicFetchService(PluginTopicFetchService topicFetchService); void setTopicModificationService(PluginTopicModificationService topicModificationService); Topic get(Long id, String type); void updateTopic(Topic topic); Topic createTopic(Topic topicDto, String bodyText); void checkViewTopicPermission(Long branchId); @Override void closeTopic(Topic topic); @Override void openTopic(Topic topic); @Override Post replyToTopic(long topicId, String answerBody, long branchId);  }### Answer:
@Test public void testGet() throws Exception{ String type = "Type"; Topic topic = new Topic(); topic.setType(type); when(topicFetchService.get(anyLong())).thenReturn(topic); Topic actual = TransactionalTypeAwarePluginTopicService.getInstance().get(1L, type); assertEquals(actual, topic); }