public Object service(String declaringClassCanonicalName, String methodName, Object[] arguments, String rootPath, boolean useRootRelativePath)
            throws Exception {
        log.debug("declaringClassCanonicalName: {}, methodName: {}, arguments: {}, rootPath: {}, useRootRelativePath: {}",
                new Object[]{declaringClassCanonicalName, methodName, arguments, rootPath, useRootRelativePath});

        String rootRelativePath = useRootRelativePath ? getRootRelativePath(declaringClassCanonicalName, methodName) : "";
        String simulatorRequest = createRequest(arguments);
        
        Optional<SimulatorResponse> simulatorResponseOptional = simulator.service(rootPath, rootRelativePath, simulatorRequest, CONTENT_TYPE);
        SimulatorResponse simulatorResponse = simulatorResponseOptional.get();

        Object response = createResponse(simulatorResponse.getResponse());
        if (response instanceof Throwable) {
            throw (Exception) response;
        }
        return response;
    }
public Object service ( String declaringClassCanonicalName , String methodName , Object [ ] arguments , String rootPath , boolean useRootRelativePath ) throws Exception { log . debug ( "declaringClassCanonicalName: {}, methodName: {}, arguments: {}, rootPath: {}, useRootRelativePath: {}" , new Object [ ] { declaringClassCanonicalName , methodName , arguments , rootPath , useRootRelativePath } ) ; String rootRelativePath = useRootRelativePath ? getRootRelativePath ( declaringClassCanonicalName , methodName ) : "" ; String simulatorRequest = createRequest ( arguments ) ; Optional < SimulatorResponse > simulatorResponseOptional = simulator . service ( rootPath , rootRelativePath , simulatorRequest , CONTENT_TYPE ) ; SimulatorResponse simulatorResponse = simulatorResponseOptional . get ( ) ; Object response = createResponse ( simulatorResponse . getResponse ( ) ) ; if ( response instanceof Throwable ) { throw ( Exception ) response ; } return response ; }
Returns some simulation response if found.

@param declaringClassCanonicalName the class that declares the intercepted method
@param methodName                  the name of the intercepted method
@param arguments                   the arguments to the intercepted method
@param rootPath                    the root path in which to (recursively) find simulator test data
@param useRootRelativePath         true if the declaringClassCanonicalName and methodName should be used as an relative path extension of rootPath, otherwise false
@return some simulation response
@throws Exception