@Test public void testInvalidHeader() throws Exception { final Socket socket = serverSocket.connect(); final OutputStream out = socket.getOutputStream(); out.write(0xca); out.write(0xfe); out.write(0xba); out.write(0xbe); serverSocket.waitForAccept(); logger.assertException(IOException.class, "Invalid execution data file."); controller.shutdown(); }