### Question:
GroupedTopicSource extends ActionSource { public boolean groupSpecified() { return group != null && !group.isEmpty(); } GroupedTopicSource(String name, String group);  GroupedTopicSource(GroupedTopic topic); String getName(); String getGroup(); boolean groupSpecified(); void overrideGroup(String group); @Override boolean equals(Object o); @Override String toString();  }### Answer:
@Test public void testEmptyOrNullGroupIsUnspecified() { assertFalse(new GroupedTopicSource("test-topic", null).groupSpecified()); assertFalse(new GroupedTopicSource("test-topic", "").groupSpecified()); }
@Test public void testNonEmptyGroupIsSpecified() { assertTrue(new GroupedTopicSource("test-topic", "test-group").groupSpecified()); }