Don’t use raw Answer.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 5 Nov 2013 21:09:42 +0000 (22:09 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:53 +0000 (22:25 +0100)
src/test/java/net/pterodactylus/sone/data/Mocks.java

index 0e8a731..4b60c1a 100644 (file)
@@ -258,16 +258,16 @@ public class Mocks {
                                        return Ordering.from(Reply.TIME_COMPARATOR).sortedCopy(postReplies.get(post));
                                }
                        });
-                       doAnswer(new Answer() {
+                       doAnswer(new Answer<Void>() {
                                @Override
-                               public Object answer(InvocationOnMock invocation) throws Throwable {
+                               public Void answer(InvocationOnMock invocation) throws Throwable {
                                        postLikingSones.put(post, (Sone) invocation.getArguments()[0]);
                                        return null;
                                }
                        }).when(post).like(Matchers.<Sone>any());
-                       doAnswer(new Answer() {
+                       doAnswer(new Answer<Void>() {
                                @Override
-                               public Object answer(InvocationOnMock invocation) throws Throwable {
+                               public Void answer(InvocationOnMock invocation) throws Throwable {
                                        postLikingSones.remove(post, (Sone) invocation.getArguments()[0]);
                                        return null;
                                }