return requestParameters.containsKey(parameter) ? requestParameters.get(parameter).iterator().next() : invocation.<String>getArgument(1);
}
});
+ when(httpRequest.isParameterSet(anyString())).thenAnswer(new Answer<Boolean>() {
+ @Override
+ public Boolean answer(InvocationOnMock invocation) throws Throwable {
+ return requestParameters.containsKey(invocation.<String>getArgument(0)) &&
+ requestParameters.get(invocation.<String>getArgument(0)).iterator().next() != null;
+ }
+ });
when(httpRequest.isPartSet(anyString())).thenAnswer(new Answer<Boolean>() {
@Override
public Boolean answer(InvocationOnMock invocation) throws Throwable {
}
});
when(core.getPost(anyString())).thenReturn(Optional.<Post>absent());
+ when(core.getPostReply(anyString())).thenReturn(Optional.<PostReply>absent());
when(core.getReplies(anyString())).thenAnswer(new Answer<List<PostReply>>() {
@Override
public List<PostReply> answer(InvocationOnMock invocation) throws Throwable {