JSONWriter { static boolean implementsJSONString(Object o) { return o != null && subclassOfJSONString(o.getClass()); } JSONWriter(Appendable w);   }
@Test public void classImplementsJSONString() { assertTrue(JSONWriter.implementsJSONString(new Ancestor())); }
@Test public void subclassImplementsJSONString() { assertTrue(JSONWriter.implementsJSONString(new Descendant())); }
@Test public void nullDoesNotImplementJSONString() { assertFalse(JSONWriter.implementsJSONString(null)); }
@Test public void objectDoesNotImplementJSONString() { assertFalse(JSONWriter.implementsJSONString(new Object())); }