@Test
public void testStringResponseThrowsException() throws Exception {

  try {
    String apiConfigSource = g.generateConfig(StringResponseEndpoint.class).get("myapi-v1.api");
    fail("String response body didn't fail in config generation");
  } catch (InvalidReturnTypeException e) {
    // expected
  }
}