@Test
public void testOverloads() throws Exception {

  methodReader = new MethodHierarchyReader(SimpleOverloadEndpoint.class);
  Iterable<Method> methods = methodReader.getLeafMethods();
  boolean foundInt = false;
  boolean foundString = false;
  for (Method method : methods) {
    if (method.equals(SimpleOverloadEndpoint.class.getMethod("foo", Integer.class))) {
      foundInt = true;
    } else if (method.equals(
        SimpleOverloadEndpoint.class.getSuperclass().getMethod("foo", String.class))) {
      foundString = true;
    } else {
      fail("Unexpected method: " + method);
    }
  }
  assertTrue(foundInt);
  assertTrue(foundString);
}