### Question:
Topic implements Serializable { public boolean isValid() { if (tokens == null) getTokens(); return valid; } Topic(String topic);   Topic(List<Token> tokens); static Topic asTopic(String s); List<Token> getTokens(); Token headToken(); boolean isEmpty(); Topic exceptHeadToken(); boolean isValid(); boolean match(Topic subscriptionTopic); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testValidationProcess() { assertThat(new Topic("finance/#/closingprice")).isInValid(); assertThat(new Topic("finance#")).isInValid(); assertThat(new Topic("/finance/#closingprice")).isInValid(); assertThat(new Topic("finance+")).isInValid(); assertThat(new Topic("finance/+")).isValid(); }