1 package net.pterodactylus.fcp;
3 import java.io.ByteArrayOutputStream;
4 import java.io.IOException;
5 import java.util.Arrays;
9 * Base test for all tests that verify a message’s appearance.
11 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
13 public class AbstractFcpMessageTest {
15 protected List<String> encodeMessage(FcpMessage fcpMessage) throws Exception {
16 ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
17 fcpMessage.write(outputStream);
18 return Arrays.asList(outputStream.toString().split("\r?\n"));