Change-Id: Ie0bc2e2add7940cb8f0ce2d5e4ea41d1e1c9d991
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
final byte[] msg = readMessage(inputStream);
LOG.info("Received BGP message: {}", msg);
final byte[] msg = readMessage(inputStream);
LOG.info("Received BGP message: {}", msg);
- Assert.assertEquals(BGP_OPEN_MSG_TYPE, msg[BGP_MSG_TYPE_OFFSET]);
+ Assert.assertEquals("BGP OPEN message type was expected", BGP_OPEN_MSG_TYPE, msg[BGP_MSG_TYPE_OFFSET]);
}
private void assertSuccessStatus(final HttpResponse<String> jsonNodeHttpResponse) {
}
private void assertSuccessStatus(final HttpResponse<String> jsonNodeHttpResponse) {
- assertTrue(jsonNodeHttpResponse.getStatus() >= 200);
- assertTrue(jsonNodeHttpResponse.getStatus() < 400);
+ final int statusCode = jsonNodeHttpResponse.getStatus();
+ assertTrue("Expected HTTP status code in range [200, 400), but was: " + statusCode,
+ statusCode >= 200 && statusCode < 400);
}
}
\ No newline at end of file
}
}
\ No newline at end of file
}
private void assertSuccessStatus(final HttpResponse<String> jsonNodeHttpResponse) {
}
private void assertSuccessStatus(final HttpResponse<String> jsonNodeHttpResponse) {
- assertTrue(jsonNodeHttpResponse.getStatus() >= 200);
- assertTrue(jsonNodeHttpResponse.getStatus() < 400);
+ final int statusCode = jsonNodeHttpResponse.getStatus();
+ assertTrue("Expected HTTP status code in range [200, 400), but was: " + statusCode,
+ statusCode >= 200 && statusCode < 400);
}
}
\ No newline at end of file
}
}
\ No newline at end of file