// Expect server to have closed due to its own timeout
EventQueue<WebSocketFrame> frames = client.readFrames(1,500,TimeUnit.MILLISECONDS);
WebSocketFrame frame = frames.poll();
Assert.assertThat("frame opcode",frame.getOpCode(),is(OpCode.CLOSE));
CloseInfo close = new CloseInfo(frame);
Assert.assertThat("close code",close.getStatusCode(),is(StatusCode.SHUTDOWN));
Assert.assertThat("close reason",close.getReason(),containsString("Timeout"));
}
finally
{
client.close();
}