@Test
public void enumResponseIsBlocked() throws Exception {

  final class Endpoint {
    @SuppressWarnings("unused")
    public TestEnum get() {
      return TestEnum.A;
    }
  }
  new ApiConfigAnnotationReader().loadEndpointMethods(serviceContext, Endpoint.class,
      apiConfig.getApiClassConfig().getMethods());
  try {
    writer.writeConfig(Collections.singleton(apiConfig));
    fail();
  } catch (InvalidReturnTypeException e) {
    // Expected.
  }
}