final byte[] mockServerData1 = new byte[] {0x03, 0x02, 0x01};
final byte[] mockClientData2 = new byte[] {0x02, 0x04, 0x02, 0x03};
final byte[] mockServerData2 = new byte[] {0x02, 0x02, 0x01, 0x04};
MockServer server = new MockServer(new Packet[] {new Packet("Client hello") {
{
type = CLIENT;
data = mockClientData1;
}
}, new Packet("Server hello") {
{
type = SERVER;
data = mockServerData1;
}
}, new Packet("Upgrade connection to SSL") {
{
type = UPGRADE_TO_SSL;
}
}, new Packet("Client data over SSL") {
{
type = CLIENT;
data = mockClientData2;
}
}, new Packet("Server data over SSL") {
{
type = SERVER;
data = mockServerData2;
}
}});