Sho SHIMIZU
Committed by Gerrit Code Review

Replace useless assertion with type check by instanceof

Change-Id: I6b80e42e47579914776497f2314b9aa75d98dabf
......@@ -25,8 +25,8 @@ import org.onosproject.pcepio.protocol.PcepMessage;
import org.onosproject.pcepio.protocol.PcepMessageReader;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsSame.sameInstance;
public class PcepCloseMsgTest {
......@@ -46,7 +46,7 @@ public class PcepCloseMsgTest {
PcepMessage message;
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepCloseMsg) message));
assertThat(message, instanceOf(PcepCloseMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
......
......@@ -26,8 +26,8 @@ import org.onosproject.pcepio.protocol.PcepMessage;
import org.onosproject.pcepio.protocol.PcepMessageReader;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsSame.sameInstance;
/**
* Test cases for PCEP ERROR Message.
......@@ -64,7 +64,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -103,7 +103,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -141,7 +141,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -177,7 +177,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -212,7 +212,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -246,7 +246,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -279,7 +279,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -312,7 +312,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -344,7 +344,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -376,7 +376,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -409,7 +409,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -442,7 +442,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -475,7 +475,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -510,7 +510,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -544,7 +544,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -578,7 +578,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -614,7 +614,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -650,7 +650,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -688,7 +688,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
testErrorMsg = new byte[iReadLen];
......@@ -727,7 +727,7 @@ public class PcepErrorMsgTest {
byte[] testErrorMsg = {0};
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
assertThat(message, sameInstance((PcepErrorMsg) message));
assertThat(message, instanceOf(PcepErrorMsg.class));
message.writeTo(buf);
int iReadLen = buf.writerIndex();
......
......@@ -25,8 +25,8 @@ import org.onosproject.pcepio.protocol.PcepMessage;
import org.onosproject.pcepio.protocol.PcepMessageReader;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsSame.sameInstance;
public class PcepInitiateMsgTest {
......@@ -60,7 +60,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -99,7 +99,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -147,7 +147,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -194,7 +194,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
......@@ -239,7 +239,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -287,7 +287,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -334,7 +334,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -380,7 +380,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -424,7 +424,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -468,7 +468,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -512,7 +512,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -555,7 +555,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -597,7 +597,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -639,7 +639,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -680,7 +680,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -724,7 +724,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -769,7 +769,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -813,7 +813,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -860,7 +860,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -908,7 +908,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -962,7 +962,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -1017,7 +1017,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -1074,7 +1074,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -1131,7 +1131,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -1192,7 +1192,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -1254,7 +1254,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......@@ -1318,7 +1318,7 @@ public class PcepInitiateMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepInitiateMsg) message));
assertThat(message, instanceOf(PcepInitiateMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
......
......@@ -16,8 +16,8 @@
package org.onosproject.pcepio;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsSame.sameInstance;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
......@@ -54,7 +54,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -86,7 +86,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -119,7 +119,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -152,7 +152,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -183,7 +183,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -219,7 +219,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -255,7 +255,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -294,7 +294,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -330,7 +330,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -368,7 +368,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -406,7 +406,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -443,7 +443,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -479,7 +479,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -514,7 +514,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
testOpenMsg = buf.array();
......@@ -547,7 +547,7 @@ public class PcepOpenMsgTest {
message = reader.readFrom(buffer);
assertThat(message, sameInstance((PcepOpenMsg) message));
assertThat(message, instanceOf(PcepOpenMsg.class));
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
message.writeTo(buf);
......