### Question:
PropertyUtil { public static Boolean isMethodAGetterProperty(Method method) { String name = method.getName(); if (!name.startsWith("get")) return false; Class<?>[] parameterTypes = method.getParameterTypes(); if (parameterTypes.length != 0) return false; return hasMatchingSetter(method); }  static Boolean isMethodAGetterProperty(Method method);  }### Answer:
@Test public void is_getter_returns_false_if_method_does_not_start_with_get() throws NoSuchMethodException { Method method = PropertyUtilTestClass.class.getMethod("theSize"); assertFalse(PropertyUtil.isMethodAGetterProperty(method)); }
@Test public void is_getter_returns_false_if_method_has_parameters() throws NoSuchMethodException { Method method = PropertyUtilTestClass.class.getMethod("getId", int.class); assertFalse(PropertyUtil.isMethodAGetterProperty(method)); }
@Test public void is_getter_returns_false_if_no_matching_setter_exists() throws NoSuchMethodException { Method method = PropertyUtilTestClass.class.getMethod("getSymbol"); assertFalse(PropertyUtil.isMethodAGetterProperty(method)); }