TopicManagerImpl implements TopicManager { boolean isInconsistenceContext(String topic, Session session) { return null == topic || null == session || topic.isEmpty(); }  @Override Map<String, Collection<Session>> getSessionsByTopic(); @Override int registerTopicSession(String topic, Session session); @Override int unregisterTopicSession(String topic, Session session); @Override Collection<String> removeSessionsToTopic(Collection<Session> sessions); @Override Collection<String> removeSessionToTopics(Session session); @Override Collection<Session> getSessionsForTopic(String topic); @Override int getNumberSubscribers(String topic);  }
@Test public void testIsInconsistenceContext() { System.out.println("isInconsistenceContext"); Session session = mock(Session.class); boolean result = instance.isInconsistenceContext(null, null); assertThat(result).isTrue(); result = instance.isInconsistenceContext(null, session); assertThat(result).isTrue(); result = instance.isInconsistenceContext("", null); assertThat(result).isTrue(); result = instance.isInconsistenceContext("", session); assertThat(result).isTrue(); result = instance.isInconsistenceContext("TOPIC", null); assertThat(result).isTrue(); result = instance.isInconsistenceContext("TOPIC", session); assertThat(result).isFalse(); }