1 package net.pterodactylus.irc.connection;
3 import static java.util.Arrays.asList;
4 import static org.mockito.Mockito.mock;
5 import static org.mockito.Mockito.when;
7 import net.pterodactylus.irc.Reply;
10 * Helper class to mock {@link Reply}s for testing {@link Handler}s.
12 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
14 public class Replies {
16 public static Reply createReply(String command, String channel) {
17 final Reply reply = mock(Reply.class);
18 when(reply.command()).thenReturn(command);
19 when(reply.parameters()).thenReturn(asList(":some.server", channel));
23 public static Reply createReply(String command) {
24 Reply reply = mock(Reply.class);
25 return when(reply.command()).thenReturn(command).getMock();