@Test public void testComputeMinVersion() { ConsumerConnection consumerConnection = new ConsumerConnection(); HashSet<Connection> connections = new HashSet<Connection>(); 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); }
public int computeMinVersion() { int minVersion = Integer.MAX_VALUE; for (Connection c : this.connectionSet) { if (c.getVersion() < minVersion) { minVersion = c.getVersion(); } } return minVersion; }
ConsumerConnection extends RemotingSerializable { public int computeMinVersion() { int minVersion = Integer.MAX_VALUE; for (Connection c : this.connectionSet) { if (c.getVersion() < minVersion) { minVersion = c.getVersion(); } } return minVersion; } }
ConsumerConnection extends RemotingSerializable { public int computeMinVersion() { int minVersion = Integer.MAX_VALUE; for (Connection c : this.connectionSet) { if (c.getVersion() < minVersion) { minVersion = c.getVersion(); } } return minVersion; }  }
ConsumerConnection extends RemotingSerializable { public int computeMinVersion() { int minVersion = Integer.MAX_VALUE; for (Connection c : this.connectionSet) { if (c.getVersion() < minVersion) { minVersion = c.getVersion(); } } return minVersion; }  int computeMinVersion(); HashSet<Connection> getConnectionSet(); void setConnectionSet(HashSet<Connection> connectionSet); ConcurrentMap<String, SubscriptionData> getSubscriptionTable(); void setSubscriptionTable(ConcurrentHashMap<String, SubscriptionData> subscriptionTable); ConsumeType getConsumeType(); void setConsumeType(ConsumeType consumeType); MessageModel getMessageModel(); void setMessageModel(MessageModel messageModel); ConsumeFromWhere getConsumeFromWhere(); void setConsumeFromWhere(ConsumeFromWhere consumeFromWhere); }
ConsumerConnection extends RemotingSerializable { public int computeMinVersion() { int minVersion = Integer.MAX_VALUE; for (Connection c : this.connectionSet) { if (c.getVersion() < minVersion) { minVersion = c.getVersion(); } } return minVersion; }  int computeMinVersion(); HashSet<Connection> getConnectionSet(); void setConnectionSet(HashSet<Connection> connectionSet); ConcurrentMap<String, SubscriptionData> getSubscriptionTable(); void setSubscriptionTable(ConcurrentHashMap<String, SubscriptionData> subscriptionTable); ConsumeType getConsumeType(); void setConsumeType(ConsumeType consumeType); MessageModel getMessageModel(); void setMessageModel(MessageModel messageModel); ConsumeFromWhere getConsumeFromWhere(); void setConsumeFromWhere(ConsumeFromWhere consumeFromWhere);  }