fixes getAccessorResourcesByResourcePermission to be whitespace consistent and adds complete set of test cases for this method