SimpleJsonWriter { SimpleJsonWriter put(String name, Object value) { verifyValues(Collections.singletonMap(name, value)); this.valueMap.put(name, value); return this; }  static SimpleJsonWriter of(Map<String, ?> values); @Override String toString();  }
@Test(expected = IllegalArgumentException.class) public void itFailsOnUnsupportedObject() { jsonWriter.put("anyobj", new Object()); fail("should not be accepted"); }