AspectUtils { public void afterMethod(JoinPoint joinPoint, Object result, long lengthMillis) { Signature signature = joinPoint.getSignature(); String methodName = signature.getName(); boolean hasReturnType = signature instanceof MethodSignature && ((MethodSignature) signature).getReturnType() != void.class; StringBuilder builder = new StringBuilder(); builder.append(methodName).append("() Ended [").append(lengthMillis).append("ms]"); LoggerFactory.getLogger(joinPoint.getTarget().getClass()).info(builder.toString()); if (hasReturnType) { builder.append(" = "); builder.append(toString(result)); } LoggerFactory.getLogger(joinPoint.getTarget().getClass()).debug(builder.toString()); } AspectUtils();  AspectUtils(SimpleMarshaller marshaller); void beforeMethod(JoinPoint joinPoint); void afterMethod(JoinPoint joinPoint, Object result,
			long lengthMillis); StringBuilder logParamValues(StringBuilder logLine,
			String[] paramNames, Object[] paramValues); @SuppressWarnings("rawtypes") String toString(Object object); SimpleMarshaller getMarshaller(); void setMarshaller(SimpleMarshaller marshaller); String getObjectdetails(Object obj); String getInXMLFormat(Object object);  }
@Test public void testAfterMethod() throws NoSuchMethodException, SecurityException { JoinPoint jpMock = setJointPoint(); String result = new String("resultString"); sut.afterMethod(jpMock,result, 12l); assertNotNull(sut.getMarshaller()); }