getAll renamed to getAllPosts, test and sample refactored