@Test public void testGetSubject_NoListeners() { assertEquals("", tree.getSubject()); }
public String getSubject() { if (parent == null) { return ""; } String parentSubject = parent.getSubject(); if ("".equals(parentSubject)) { return pathElement; } else { return parentSubject + "." + pathElement; } }
EventListenerTree { public String getSubject() { if (parent == null) { return ""; } String parentSubject = parent.getSubject(); if ("".equals(parentSubject)) { return pathElement; } else { return parentSubject + "." + pathElement; } } }
EventListenerTree { public String getSubject() { if (parent == null) { return ""; } String parentSubject = parent.getSubject(); if ("".equals(parentSubject)) { return pathElement; } else { return parentSubject + "." + pathElement; } } EventListenerTree();  EventListenerTree(String pathElement, EventListenerTree parent); }
EventListenerTree { public String getSubject() { if (parent == null) { return ""; } String parentSubject = parent.getSubject(); if ("".equals(parentSubject)) { return pathElement; } else { return parentSubject + "." + pathElement; } } EventListenerTree();  EventListenerTree(String pathElement, EventListenerTree parent); String getPathElement(); String getSubject(); void addListener(EventListener listener, String subject); Set<EventListener> getListeners(String subject); boolean hasListener(String subject); int getListenerCount(String subject); void removeAllListeners(String beanName); }
EventListenerTree { public String getSubject() { if (parent == null) { return ""; } String parentSubject = parent.getSubject(); if ("".equals(parentSubject)) { return pathElement; } else { return parentSubject + "." + pathElement; } } EventListenerTree();  EventListenerTree(String pathElement, EventListenerTree parent); String getPathElement(); String getSubject(); void addListener(EventListener listener, String subject); Set<EventListener> getListeners(String subject); boolean hasListener(String subject); int getListenerCount(String subject); void removeAllListeners(String beanName);  }