### Question:
Utils { static Method getMethod(Class<?> cls, XmlAccessType accessType, String methodName, Class<?>... paramTypes) { for (Method m : getMethods(cls, accessType, true)) { if (m.getName().equals(methodName) && Arrays.equals(m.getParameterTypes(), paramTypes)) { return m; } } return null; } private  Utils();   }### Answer:
@Test public void testGetMethod() { for (Method method : Utils.getGetters(MyException.class, XmlAccessType.PUBLIC_MEMBER)) { if ("toString".equals(method.getName())) { fail("toString should not be included in get methods list"); } } }