### Question:
CoapTcpCSM { public CoapTcpCSM withNewOptions(Long maxMessageSize, Boolean blockwiseTransfer) { return new CoapTcpCSM( maxMessageSize != null ? maxMessageSize : this.maxMessageSize, blockwiseTransfer != null ? blockwiseTransfer : this.blockwiseTransfer ); } CoapTcpCSM(long maxMessageSize, boolean blockwiseTransfer); static CoapTcpCSM min(CoapTcpCSM cap1, CoapTcpCSM cap2); CoapTcpCSM withNewOptions(Long maxMessageSize, Boolean blockwiseTransfer); boolean isBlockTransferEnabled(); boolean useBlockTransfer(byte[] payload); long getMaxMessageSize(); int getMaxMessageSizeInt(); boolean isBERTEnabled(); BlockSize getBlockSize(); int getMaxOutboundPayloadSize(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final CoapTcpCSM BASE; }### Answer:
@Test public void withNewOptions() { assertEquals(new CoapTcpCSM(1152, false), BASE.withNewOptions(null, null)); assertEquals(new CoapTcpCSM(1000, false), BASE.withNewOptions(1000L, null)); assertEquals(new CoapTcpCSM(1000, true), BASE.withNewOptions(1000L, true)); }