@Test public void testSerializeResponseWithEndpointContext() { Request request = Request.newGet(); request.setSourceContext(ENDPOINT_CONTEXT); request.setToken(new byte[] { 0x00 }); request.setMID(1); Response response = Response.createResponse(request, ResponseCode.CONTENT); response.setType(Type.ACK); response.setMID(request.getMID()); response.setToken(request.getToken()); RawData data = serializer.serializeResponse(response, null); assertThat(data.getEndpointContext(), is(equalTo(ENDPOINT_CONTEXT))); }
public final RawData serializeResponse(final Response response) { return serializeResponse(response, null); }
DataSerializer { public final RawData serializeResponse(final Response response) { return serializeResponse(response, null); } }
DataSerializer { public final RawData serializeResponse(final Response response) { return serializeResponse(response, null); }  }
DataSerializer { public final RawData serializeResponse(final Response response) { return serializeResponse(response, null); }  final byte[] getByteArray(final Message message); final RawData serializeRequest(final Request request); final RawData serializeRequest(final Request request, final MessageCallback outboundCallback); final RawData serializeResponse(final Response response); final RawData serializeResponse(final Response response, final MessageCallback outboundCallback); final RawData serializeEmptyMessage(final EmptyMessage emptyMessage); final RawData serializeEmptyMessage(final EmptyMessage emptyMessage, final MessageCallback outboundCallback); static void serializeOptionsAndPayload(DatagramWriter writer, final OptionSet optionSet,
			final byte[] payload); }
DataSerializer { public final RawData serializeResponse(final Response response) { return serializeResponse(response, null); }  final byte[] getByteArray(final Message message); final RawData serializeRequest(final Request request); final RawData serializeRequest(final Request request, final MessageCallback outboundCallback); final RawData serializeResponse(final Response response); final RawData serializeResponse(final Response response, final MessageCallback outboundCallback); final RawData serializeEmptyMessage(final EmptyMessage emptyMessage); final RawData serializeEmptyMessage(final EmptyMessage emptyMessage, final MessageCallback outboundCallback); static void serializeOptionsAndPayload(DatagramWriter writer, final OptionSet optionSet,
			final byte[] payload);  }