@Override
    public String getPort() {
        final int port = Integer.parseInt(Optional.ofNullable(super.getPort()).orElseGet(() -> "-1"));
        final int mergedPort = port <= 0 ? PortUtils.findPort(getContext().getAutowireCapableBeanFactory()) : port;
        return String.valueOf(mergedPort);
    }
@Test
    public void testGetPort() {
        String port = eventListener.getPort();
        assertNotNull(port);
        assertEquals(port, "8080");
    }