ShutdownSignalException sse = snc.getCloseReason();
checkShutdownSignal(expectedCode, sse);
}
public void checkShutdownSignal(int expectedCode, ShutdownSignalException sse) {
Command closeCommand = (Command) sse.getReason();
channel = null;
if (sse.isHardError()) {
connection = null;
AMQP.Connection.Close closeMethod = (AMQP.Connection.Close) closeCommand.getMethod();
assertEquals(expectedCode, closeMethod.getReplyCode());
} else {
AMQP.Channel.Close closeMethod = (AMQP.Channel.Close) closeCommand.getMethod();
assertEquals(expectedCode, closeMethod.getReplyCode());
}
}