In intellij, create such a live template:
public static void main(String args[]) { Class<?> clazz = $Bean$.class; String object = "$bean$"; java.lang.reflect.Method[] methods = clazz.getMethods(); for (java.lang.reflect.Method m : methods) { if ((m.getName().startsWith("get") || m.getName().startsWith("is") )&& (!m.getName().equals("getClass")) && m.getParameterTypes().length == 0) { System.out.println( "assertEquals(\"xxx\"," + object + "." + m.getName() + "()); " ); } } }