write unit test for AuthorResource