public int computeMinVersion() {
        int minVersion = Integer.MAX_VALUE;
        for (Connection c : this.connectionSet) {
            if (c.getVersion() < minVersion) {
                minVersion = c.getVersion();
            }
        }

        return minVersion;
    }
@Test
    public void testComputeMinVersion() {
        ConsumerConnection consumerConnection = new ConsumerConnection();
        HashSet<Connection> connections = new HashSet<>();
        Connection conn1 = new Connection();
        conn1.setVersion(1);
        connections.add(conn1);
        Connection conn2 = new Connection();
        conn2.setVersion(10);
        connections.add(conn2);
        consumerConnection.setConnectionSet(connections);

        int version = consumerConnection.computeMinVersion();
        assertThat(version).isEqualTo(1);
    }