MessageUtil { public static SessionResponseMessage createEmptySession(byte[] request) { final SessionResponseMessage responseMessage = new SessionResponseMessage(); responseMessage.setSessionAsUUID(RexProMessage.EMPTY_SESSION); responseMessage.Request = request; responseMessage.Languages = new String[0]; return responseMessage; }  static ErrorResponseMessage createErrorResponse(final byte[] request, final byte[] session,
                                                           final Integer flag, final String errorMessage); static SessionResponseMessage createNewSession(byte[] request, final List<String> languages); static SessionResponseMessage createEmptySession(byte[] request);  }
@Test public void createEmptySession() { byte [] request = "request".getBytes(); final SessionResponseMessage msg = MessageUtil.createEmptySession(request); Assert.assertNotNull(msg); Assert.assertEquals(request, msg.Request); Assert.assertEquals(0, msg.Languages.length); Assert.assertTrue(Arrays.equals(BitWorks.convertUUIDToByteArray(RexProMessage.EMPTY_SESSION), msg.Session)); }