### Question:
CoapUdpMessaging extends CoapMessaging { public final void init(int duplicationListSize, ScheduledExecutorService scheduledExecutor, boolean isSelfCreatedExecutor, MessageIdSupplier idContext, int maxQueueSize, CoapTransaction.Priority defaultPriority, long delayedTransactionTimeout, DuplicatedCoapMessageCallback duplicatedCoapMessageCallback) { if (coapTransporter == null || scheduledExecutor == null || idContext == null || defaultPriority == null || duplicatedCoapMessageCallback == null) { throw new NullPointerException(); } this.scheduledExecutor = scheduledExecutor; this.isSelfCreatedExecutor = isSelfCreatedExecutor; this.idContext = idContext; this.delayedTransactionTimeout = delayedTransactionTimeout; this.duplicatedCoapMessageCallback = duplicatedCoapMessageCallback; this.defaultPriority = defaultPriority; transMgr.setMaximumEndpointQueueSize(maxQueueSize); if (transmissionTimeout == null) { this.transmissionTimeout = new CoapTimeout(); } if (duplicationListSize > 0) { duplicationDetector = new DuplicationDetector(TimeUnit.MILLISECONDS, DEFAULT_DUPLICATION_TIMEOUT, duplicationListSize, scheduledExecutor); } } CoapUdpMessaging(CoapTransport coapTransport); final void init(int duplicationListSize,
            ScheduledExecutorService scheduledExecutor, boolean isSelfCreatedExecutor,
            MessageIdSupplier idContext,
            int maxQueueSize, CoapTransaction.Priority defaultPriority,
            long delayedTransactionTimeout, DuplicatedCoapMessageCallback duplicatedCoapMessageCallback); ScheduledExecutorService getScheduledExecutor(); @Override synchronized void start(CoapRequestHandler coapRequestHandler); void setSpecialCoapTransactionPriority(CoapTransaction.Priority specialCoapTransactionPriority); @Override void stop0(); void setTransmissionTimeout(TransmissionTimeout transmissionTimeout); @Override void sendResponse(CoapPacket request, CoapPacket resp, TransportContext ctx); @Override void ping(InetSocketAddress destination, Callback<CoapPacket> callback); @Override void makeRequest(final CoapPacket packet, final Callback<CoapPacket> callback, final TransportContext transContext); @Override void makePrioritisedRequest(CoapPacket packet, Callback<CoapPacket> callback, TransportContext transContext); int getNumberOfTransactions();  }### Answer:
@Test public void failWhenNoTransportIsProvided() throws Exception { assertThatThrownBy(() -> udpMessaging.init(1, null, false, null, 1, null, 0, DuplicatedCoapMessageCallback.NULL)) .isExactlyInstanceOf(NullPointerException.class); assertThatThrownBy(() -> udpMessaging.init(1, null, false, null, 1, null, 0, DuplicatedCoapMessageCallback.NULL)) .isExactlyInstanceOf(NullPointerException.class); assertThatThrownBy(() -> udpMessaging.init(1, scheduledExecutor, false, null, 1, null, 0, DuplicatedCoapMessageCallback.NULL)) .isExactlyInstanceOf(NullPointerException.class); assertThatThrownBy(() -> udpMessaging.init(1, scheduledExecutor, false, () -> 1, 1, null, 0, DuplicatedCoapMessageCallback.NULL)) .isExactlyInstanceOf(NullPointerException.class); }