@Test
public void testEndpointNoApiAnnotation() throws Exception {

  ApiConfig config = createConfig(Object.class);
  try {
    annotationReader.loadEndpointClass(serviceContext, Object.class, config);
    fail("No @Api annotation should've caused reader to fail.");
  } catch (ApiConfigException expected) {
    assertEquals("class java.lang.Object has no @Api annotation.", expected.getMessage());
  }
}