LocalServerTransport implements ServerTransport<Closeable> { public static void dispose(String name) { Objects.requireNonNull(name, "name must not be null"); registry.remove(name); } private  LocalServerTransport(String name); static LocalServerTransport create(String name); static LocalServerTransport createEphemeral(); static void dispose(String name); LocalClientTransport clientTransport(); @Override Mono<Closeable> start(ConnectionAcceptor acceptor);  }
@DisplayName("dispose removes name from registry") @Test void dispose() { LocalServerTransport.dispose("test-name"); }
@DisplayName("dispose throws NullPointerException with null name") @Test void disposeNullName() { assertThatNullPointerException() .isThrownBy(() -> LocalServerTransport.dispose(null)) .withMessage("name must not be null"); }