@Test public void setChangeSet_mismatchedRequestId() { final ChangeSetMessage changeSet = ChangeSetMessage.create( 1234, null, null, null, null ); final RequestEntry request = new RequestEntry( 5678, ValueUtil.randomString(), false ); final IllegalStateException exception = expectThrows( IllegalStateException.class, () -> new MessageResponse( 1, changeSet, request ) ); assertEquals( exception.getMessage(), "Replicant-0011: Response message specified requestId '1234' but request specified requestId '5678'." ); }
@Nonnull ServerToClientMessage getMessage() { return _message; }
MessageResponse { @Nonnull ServerToClientMessage getMessage() { return _message; } }
MessageResponse { @Nonnull ServerToClientMessage getMessage() { return _message; } MessageResponse( final int schemaId,
                   @Nonnull final ServerToClientMessage message,
                   @Nullable final RequestEntry request ); }
MessageResponse { @Nonnull ServerToClientMessage getMessage() { return _message; } MessageResponse( final int schemaId,
                   @Nonnull final ServerToClientMessage message,
                   @Nullable final RequestEntry request ); @Override String toString(); }
MessageResponse { @Nonnull ServerToClientMessage getMessage() { return _message; } MessageResponse( final int schemaId,
                   @Nonnull final ServerToClientMessage message,
                   @Nullable final RequestEntry request ); @Override String toString();  }