Slightly refactored findOneObject test case