@Test public void emptyConnectionsShouldReturnEmptyRelationships() { RabbitRelationshipDetector detector = new RabbitRelationshipDetector(new ArrayList<>()); Assertions.assertThat(detector.detect()).isEmpty(); }
@Override public Set<Relationship> detect() { if (connectionFactories.isEmpty()) { return Collections.emptySet(); } return connectionFactories.stream().map(factory -> createRabbitDependency(factory.getVirtualHost())) .collect(Collectors.toSet()); }
RabbitRelationshipDetector implements RelationshipDetector { @Override public Set<Relationship> detect() { if (connectionFactories.isEmpty()) { return Collections.emptySet(); } return connectionFactories.stream().map(factory -> createRabbitDependency(factory.getVirtualHost())) .collect(Collectors.toSet()); } }
RabbitRelationshipDetector implements RelationshipDetector { @Override public Set<Relationship> detect() { if (connectionFactories.isEmpty()) { return Collections.emptySet(); } return connectionFactories.stream().map(factory -> createRabbitDependency(factory.getVirtualHost())) .collect(Collectors.toSet()); } RabbitRelationshipDetector(List<ConnectionFactory> rabbitConnectionFactories); }
RabbitRelationshipDetector implements RelationshipDetector { @Override public Set<Relationship> detect() { if (connectionFactories.isEmpty()) { return Collections.emptySet(); } return connectionFactories.stream().map(factory -> createRabbitDependency(factory.getVirtualHost())) .collect(Collectors.toSet()); } RabbitRelationshipDetector(List<ConnectionFactory> rabbitConnectionFactories); @Override Set<Relationship> detect(); }
RabbitRelationshipDetector implements RelationshipDetector { @Override public Set<Relationship> detect() { if (connectionFactories.isEmpty()) { return Collections.emptySet(); } return connectionFactories.stream().map(factory -> createRabbitDependency(factory.getVirtualHost())) .collect(Collectors.toSet()); } RabbitRelationshipDetector(List<ConnectionFactory> rabbitConnectionFactories); @Override Set<Relationship> detect();  }