ServiceTools { public boolean isConsiderateMethod(Method method) { if (method.isAnnotationPresent(TransientDataService.class) || method.isAnnotationPresent(WsDataService.class) || method.getDeclaringClass().isAssignableFrom(Object.class)) { return false; } int modifiers = method.getModifiers(); return Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers); }  String getShortName(String fullformat); String getLiteralType(Type type); IJsonMarshaller getJsonMarshaller(Annotation[] annotations); IJsonMarshaller getJsonMarshallerFromAnnotation(JsonUnmarshaller jua); String getTemplateOfType(Type type, IJsonMarshaller jsonMarshaller); String getInstanceNameFromDataservice(Class cls); boolean isConsiderateMethod(Method method);  }
@Test public void testIsConsiderateMethod() throws NoSuchMethodException { System.out.println("isConsiderateMethod"); Method method = DataService1.class.getMethod("publicMethod"); boolean result = instance.isConsiderateMethod(method); assertThat(result).isTrue(); method = DataService1.class.getMethod("hashCode"); result = instance.isConsiderateMethod(method); assertThat(result).isTrue(); method = DataService1.class.getMethod("toString"); result = instance.isConsiderateMethod(method); assertThat(result).isFalse(); method = DataService1.class.getMethod("transientMethod"); result = instance.isConsiderateMethod(method); assertThat(result).isFalse(); method = DataService1.class.getMethod("staticMethod"); result = instance.isConsiderateMethod(method); assertThat(result).isFalse(); method = DataService1.class.getDeclaredMethod("staticProtectedMethod"); result = instance.isConsiderateMethod(method); assertThat(result).isFalse(); }