How to unit test the following method using JUnit4??
public Object invoke(ProceedingJoinPoint joinPoint) throws Throwable {
Object serviceObject = null;
BaseServiceRequest baseServiceRequest = null;
ServiceContext serviceContext = null;
baseServiceRequest = (BaseServiceRequest) joinPoint.getArgs()[0];
if (baseServiceRequest == null)
ExceptionHandlerUtil.createExceptionType("SL","BaseServiceRequest cannot be empty", new Object[] {});
serviceContext = baseServiceRequest.getServiceContext();
ExceptionHandlerUtil.createExceptionType("SL","ServiceContext cannot be empty", new Object[] {});
createServiceInvocationInterceptor(baseServiceRequ est,joinPoint);
serviceObject = getServiceObject(serviceContext, joinPoint);
serviceContext.getMethodInvocationEvent().setReturnValue(serviceObject);
return serviceObject;
}