- public void testGetInetSocketAddress() throws Exception {
-
- InetSocketAddress socketAddress = new InetSocketAddress(10);
-
- assertNotNull(NetconfServerSessionNegotiator.getHostName(socketAddress));
-
- assertEquals(socketAddress.getHostName(),
- NetconfServerSessionNegotiator.getHostName(socketAddress).getValue());
-
- socketAddress = new InetSocketAddress("TestPortInet", 20);
-
- assertEquals(socketAddress.getHostName(),
- NetconfServerSessionNegotiator.getHostName(socketAddress).getValue());
-
- assertEquals(String.valueOf(socketAddress.getPort()),
- NetconfServerSessionNegotiator.getHostName(socketAddress).getKey());
-
- LocalAddress localAddress = new LocalAddress("TestPortLocal");
+ void testPortTen() {
+ final var address = new InetSocketAddress(10);
+ final var hostname = NetconfServerSessionNegotiator.getHostName(address);
+ assertNotNull(hostname);
+ assertEquals(address.getHostName(), hostname.getValue());
+ }