@Override
    public boolean equals(Object toBeCompared) {
        if (toBeCompared instanceof ControllerInfo) {
            ControllerInfo that = (ControllerInfo) toBeCompared;
            return Objects.equals(this.type, that.type) &&
                    Objects.equals(this.ip, that.ip) &&
                    Objects.equals(this.port, that.port);
        }
        return false;
    }
@Test
    public void testEquals() {
        String target1 = "ptcp:6653:192.168.1.1";
        ControllerInfo controllerInfo1 = new ControllerInfo(target1);
        String target2 = "ptcp:6653:192.168.1.1";
        ControllerInfo controllerInfo2 = new ControllerInfo(target2);
        assertTrue("wrong equals method", controllerInfo1.equals(controllerInfo2));
    }