DashboardSerializer { public void write(Dashboard dashboard, Writer writer) throws IOException { try { mapper.writeValue(writer, dashboard); } catch (JsonProcessingException e) { throw new IllegalArgumentException("dashboard cannot be serialized to JSON." + "It might contain non-serializable values.", e); } } DashboardSerializer(); String toString(Dashboard dashboard); void write(Dashboard dashboard, Writer writer); void write(Dashboard dashboard, OutputStream stream);  }
@Test @Ignore public void printTestDashboard() throws IOException { serializer.write(testDashboard(), System.out); }