Fixed mockito patching and added a matcher for substrings
code gardening