### Question:
DefaultQuery implements Query { @Override public void printOn(Media media) { media.with("name", definition.getQueryName()) .withStrings( "responseTypes", responseTypes); } DefaultQuery(QueryDefinition definition,
                        Map<String, Set<QueryHandler<?>>> handlers, Set<String> responseTypes); @Override Boolean belongsToComponent(String component); @Override boolean belongsToContext(String context); @Override void printOn(Media media);  }### Answer:
@Test public void printOn() { GsonMedia gsonMedia = new GsonMedia(); query.printOn(gsonMedia); assertEquals("{\"name\":\"queryName\",\"responseTypes\":[\"java.lang.String\"]}", gsonMedia.toString()); }