- when(postReplyBuilder.from(anyString())).thenAnswer(new Answer<PostReplyBuilder>() {
- @Override
- public PostReplyBuilder answer(InvocationOnMock invocation) throws Throwable {
- Sone sone = when(mock(Sone.class).getId()).thenReturn((String) invocation.getArguments()[0]).getMock();
- when(postReply.getSone()).thenReturn(sone);
- return postReplyBuilder;
- }
- });
- when(postReplyBuilder.to(anyString())).thenAnswer(new Answer<PostReplyBuilder>() {
- @Override
- public PostReplyBuilder answer(InvocationOnMock invocation) throws Throwable {
- when(postReply.getPostId()).thenReturn((String) invocation.getArguments()[0]);
- Post post = when(mock(Post.class).getId()).thenReturn((String) invocation.getArguments()[0]).getMock();
- when(postReply.getPost()).thenReturn(of(post));
- return postReplyBuilder;
- }
- });
- when(postReplyBuilder.withTime(anyLong())).thenAnswer(new Answer<PostReplyBuilder>() {
- @Override
- public PostReplyBuilder answer(InvocationOnMock invocation) throws Throwable {
- when(postReply.getTime()).thenReturn((Long) invocation.getArguments()[0]);
- return postReplyBuilder;
- }
- });
+ when(postReplyBuilder.from(anyString())).thenAnswer(
+ new Answer<PostReplyBuilder>() {
+ @Override
+ public PostReplyBuilder answer(
+ InvocationOnMock invocation) throws Throwable {
+ Sone sone = when(mock(Sone.class).getId()).thenReturn(
+ (String) invocation.getArguments()[0])
+ .getMock();
+ when(postReply.getSone()).thenReturn(sone);
+ return postReplyBuilder;
+ }
+ });
+ when(postReplyBuilder.to(anyString())).thenAnswer(
+ new Answer<PostReplyBuilder>() {
+ @Override
+ public PostReplyBuilder answer(
+ InvocationOnMock invocation) throws Throwable {
+ when(postReply.getPostId()).thenReturn(
+ (String) invocation.getArguments()[0]);
+ Post post = when(mock(Post.class).getId()).thenReturn(
+ (String) invocation.getArguments()[0])
+ .getMock();
+ when(postReply.getPost()).thenReturn(of(post));
+ return postReplyBuilder;
+ }
+ });
+ when(postReplyBuilder.withTime(anyLong())).thenAnswer(
+ new Answer<PostReplyBuilder>() {
+ @Override
+ public PostReplyBuilder answer(
+ InvocationOnMock invocation) throws Throwable {
+ when(postReply.getTime()).thenReturn(
+ (Long) invocation.getArguments()[0]);
+ return postReplyBuilder;
+ }
+ });