import junit.framework.TestCase;
public class CallbackOnEntityTest extends TestCase {
public void testPublicCallbackMethod() {
CallbackOnEntity callback = new CallbackOnEntity(
MockCallingBackEntity.class,
"publicCallback");
MockCallingBackEntity e = new MockCallingBackEntity();
callback.performCallback(e);
assertTrue(e.publicCallbackInvoked);
assertFalse(e.protectedCallbackInvoked);
assertFalse(e.privateCallbackInvoked);
assertFalse(e.defaultCallbackInvoked);
}