properly nest mocks according to the structure of directories