@Test
public void testGetAllMethodsOnSubclass() {

  List<Method> methodList = ReflectUtil.getAllDeclaredMethods(SubClass.class);
  assertThat(methodList).hasSize(14);
  // first 12 methods should come from Object
  for (int i = 0; i < 11; i++) {
    assertTrue(methodList.get(i).getDeclaringClass() == Object.class);
  }
  // then the superclass method
  assertThat(methodList.get(12).getName()).isEqualTo("doSomething");
  //then the subclass method
  assertThat(methodList.get(13).getName()).isEqualTo("doSomethingElse");
}