@Test
public void testSessionRequestAndResponse() throws Exception {
final RexsterClient client = getClient();
//create a session
final SessionRequestMessage outMsg = new SessionRequestMessage();
outMsg.setRequestAsUUID(UUID.randomUUID());
RexProMessage inMsg = client.execute(outMsg);
Assert.assertNotNull(inMsg.Session);
Assert.assertTrue(inMsg instanceof SessionResponseMessage);
UUID sessionKey = BitWorks.convertByteArrayToUUID(inMsg.Session);
//kill said session
final SessionRequestMessage deathMsg = new SessionRequestMessage();
deathMsg.Session = BitWorks.convertUUIDToByteArray(sessionKey);
deathMsg.setRequestAsUUID(UUID.randomUUID());
deathMsg.metaSetKillSession(true);
inMsg = client.execute(deathMsg);
Assert.assertNotNull(inMsg.Session);
Assert.assertTrue(inMsg instanceof SessionResponseMessage);