remove repo deps from test and refactor FindOneBy