@Test
public void multipleResourceParametersErrorMessage() throws Exception {

  final class Endpoint {
    @SuppressWarnings("unused")
    public void get(Bean bean1, Bean bean2) {
    }
  }
  new ApiConfigAnnotationReader().loadEndpointMethods(
      serviceContext, Endpoint.class, apiConfig.getApiClassConfig().getMethods());
  try {
    writer.writeConfig(Collections.singleton(apiConfig));
    fail("Method with multiple resources should throw IllegalArgumentException");
  } catch (IllegalArgumentException e) {
    assertThat(e.getMessage()).contains("cannot have multiple resource parameters");
  }
}