### Question:
SimulatorHttpMessageConverter implements GenericHttpMessageConverter<Object> { @Override public void write(Object o, Type type, MediaType contentType, HttpOutputMessage outputMessage) throws HttpMessageNotWritableException { throw new IllegalStateException("Illegal write operation on simulator message converter."); }  @Override boolean canRead(Type type, Class contextClass, MediaType mediaType); @Override Object read(Type type, Class contextClass, HttpInputMessage inputMessage); @Override boolean canWrite(Type type, Class clazz, MediaType mediaType); @Override void write(Object o, Type type, MediaType contentType, HttpOutputMessage outputMessage); @Override boolean canRead(Class clazz, MediaType mediaType); @Override boolean canWrite(Class clazz, MediaType mediaType); @Override List<MediaType> getSupportedMediaTypes(); @Override Object read(Class clazz, HttpInputMessage inputMessage); @Override void write(Object o, MediaType contentType, HttpOutputMessage outputMessage);  }### Answer:
@Test(expectedExceptions = IllegalStateException.class) public void testUnsupportedWrite() { converter.write("Hello", MediaType.TEXT_PLAIN, new MockHttpOutputMessage()); }
@Test(expectedExceptions = IllegalStateException.class) public void testUnsupportedGenericWrite() { converter.write("Hello", String.class, MediaType.TEXT_PLAIN, new MockHttpOutputMessage()); }