test case for fetching and storing post