LocalClientTransport implements ClientTransport { public static LocalClientTransport create(String name) { Objects.requireNonNull(name, "name must not be null"); return create(name, ByteBufAllocator.DEFAULT); } private  LocalClientTransport(String name, ByteBufAllocator allocator); static LocalClientTransport create(String name); static LocalClientTransport create(String name, ByteBufAllocator allocator); @Override Mono<DuplexConnection> connect();  }
@DisplayName("creates client") @Test void create() { assertThat(LocalClientTransport.create("test-name")).isNotNull(); }
@DisplayName("throws NullPointerException with null name") @Test void createNullName() { assertThatNullPointerException() .isThrownBy(() -> LocalClientTransport.create(null)) .withMessage("name must not be null"); }