protected static function checkMatchingArguments($returnValues, $arguments)
    {
        // if doesn't have exactly the arguments check for Hamcrest-PHP functions to validate
        foreach ($returnValues as $currentMethodArguments => $currentMethod)
        {
            // if not its not an Hamcrest Function
            if (strpos($currentMethodArguments, 'Hamcrest\\') === false) {
                continue;
            }

            $hamcrest = unserialize($currentMethodArguments);

            try
            {
                // Loop both hamcrest and arguments
                foreach ($arguments as $index => $arg)
                {
                    if ( ! array_key_exists($index, $hamcrest)) {
                        throw new AssertionError('not enough hamcrest indexes');
                    }

                    // @throws Assertion error on failure
                    if ($hamcrest[$index] instanceof Matcher) {
                        assertThat($arg, $hamcrest[$index]);

                    } else if ($arg != $hamcrest[$index]) {
                        throw new AssertionError();
                    }

                }
            }
            catch(AssertionError $e) {
                continue;
            }

            // if didn't cached assert error then its matching an hamcrest
            return $currentMethodArguments;
        }

        return NULL;
    }