- private Post preparePostWithoutRecipient(Sone sone) {
- Post post = preparePost(sone);
- when(post.getRecipientId()).thenReturn(Optional.<String>absent());
- when(post.getRecipient()).thenReturn(Optional.<Sone>absent());
- return post;
- }
-
- private Post preparePostWithRecipient(Sone sone, Sone otherSone) {
- Post post = preparePost(sone);
- String otherSoneId = otherSone.getId();
- when(post.getRecipientId()).thenReturn(of(otherSoneId));
- when(post.getRecipient()).thenReturn(of(otherSone));
- return post;
- }
-
- private Post preparePost(Sone sone) {
- Post post = mocks.mockPost(sone, "PostId").create();
- when(post.getText()).thenReturn("Text of the post.");
- when(post.getTime()).thenReturn(1000L);
- return post;
- }
-