Added test case for get_posts