searchByAuthor controllers and tests

refactored