test/src/test/java/eu/internetofus/common/test/WeNetComponentContainersTest.java
/**
   * Check can get a free port.
   *
   * @see WeNetComponentContainers#nextFreePort()
   */
Check can get a free port.
Check can get a free port .
@Test
  public void shouldObtainFreePort() {
    final var ports = new HashSet<Integer>();
    for (var i = 0; i < 10; i++) {
      final var port = WeNetComponentContainers.nextFreePort();
      assertThat(port).isGreaterThan(0);
      assertThat(ports.add(port)).isTrue();
    }
  }
@ Test public void shouldObtainFreePort ( ) { final var ports = new HashSet < Integer > ( ) ; for ( var i = 0 ; i < 10 ; i ++ ) { final var port = WeNetComponentContainers . nextFreePort ( ) ; assertThat ( port ) . isGreaterThan ( 0 ) ; assertThat ( ports . add ( port ) ) . isTrue ( ) ; } }
Check can get a free port.
Check can get a free port .