@@ -0,0 +1,2317 @@
+package com.khs.sherpa.util;%0A%0Aimport java.io.Serializable;%0Aimport java.lang.reflect.Method;%0Aimport java.util.Collection;%0Aimport java.util.List;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Apublic class MethodUtilTest %7B%0A%09%0A%09interface InterfaceGenericClass%3CT%3E %7B%0A%09%09T create(T entity);%0A%09%09T update(Serializable id, T entity);%0A%09%09void delete(Serializable id);%0A%09%09Collection%3CT%3E fetch();%0A%09%09T fetchOne(Serializable id);%0A%09%7D%0A%09%0A%09class GenericClass %7B %7D%0A%09%0A%09class ConcreteGenericInterfaceClass implements InterfaceGenericClass%3CGenericClass%3E %7B%0A%0A%09%09public GenericClass create(GenericClass entity) %7B return null; %7D%0A%09%09public GenericClass update(Serializable id, GenericClass entity) %7B return null; %7D%0A%09%09public void delete(Serializable id) %7B %7D%0A%09%09public Collection%3CGenericClass%3E fetch() %7B return null; %7D%0A%09%09public GenericClass fetchOne(Serializable id) %7B return null; %7D%0A%09%09%0A%09%7D%0A%09%0A%09interface InterfaceClass %7B%0A%09%09Object create(Object entity);%0A%09%09Object update(Serializable id, Object entity);%0A%09%09void delete(Serializable id);%0A%09%09Collection%3CObject%3E fetch();%0A%09%09Object fetchOne(Serializable id);%0A%09%7D%0A%09%0A%09class ConcreteInterfaceClass implements InterfaceClass %7B%0A%0A%09%09public Object create(Object entity) %7B return null; %7D%0A%09%09public Object update(Serializable id, Object entity) %7B return null; %7D%0A%09%09public void delete(Serializable id) %7B %7D%0A%09%09public Collection%3CObject%3E fetch() %7B return null; %7D%0A%09%09public Object fetchOne(Serializable id) %7B return null; %7D%0A%09%09%0A%09%7D%0A%09%0A%09class ConcreteClass %7B%0A%0A%09%09public GenericClass create(GenericClass entity) %7B return null; %7D%0A%09%09public GenericClass update(Serializable id, GenericClass entity) %7B return null; %7D%0A%09%09public void delete(Serializable id) %7B %7D%0A%09%09public Collection%3CGenericClass%3E fetch() %7B return null; %7D%0A%09%09public GenericClass fetchOne(Serializable id) %7B return null; %7D%0A%09%09%0A%09%7D%0A%09%0A%09@Test%0A%09public void testGetAllMethodsNoInterface() %7B%0A%09%09List%3CMethod%3E methods = MethodUtil.getAllMethods(ConcreteClass.class);%0A%09%09Assert.assertEquals(5, methods.size());%0A%09%7D%0A%09%0A%09@Test%0A%09public void testGetAllMethodsWithInterface() %7B%0A%09%09List%3CMethod%3E methods = MethodUtil.getAllMethods(ConcreteInterfaceClass.class);%0A%09%09Assert.assertEquals(5, methods.size());%0A%09%7D%0A%09%0A%09@Test%0A%09public void testGetAllMethodsWithGenericInterface() %7B%0A%09%09List%3CMethod%3E methods = MethodUtil.getAllMethods(ConcreteGenericInterfaceClass.class);%0A%09%09Assert.assertEquals(5, methods.size());%0A%09%7D%0A%7D%0A

add test for MethodUtil