+ public static Post mockPost(Core core, Sone sone, String postId) {
+ Post post = mock(Post.class);
+ when(post.getId()).thenReturn(postId);
+ when(post.getSone()).thenReturn(sone);
+ Database database = core.getDatabase();
+ when(database.getPost(eq(postId))).thenReturn(of(post));
+ return post;
+ }
+
+ public static PostReply mockPostReply(Core core, Sone sone, String replyId) {
+ PostReply postReply = mock(PostReply.class);
+ when(postReply.getId()).thenReturn(replyId);
+ when(postReply.getSone()).thenReturn(sone);
+ Database database = core.getDatabase();
+ when(database.getPostReply(eq(replyId))).thenReturn(of(postReply));
+ return postReply;
+ }
+