Add unit test for CreatePostCommand.