ClusterComposition { public boolean hasRoutersAndReaders() { return !routers.isEmpty() && !readers.isEmpty(); } private  ClusterComposition( long expirationTimestamp );  ClusterComposition(
            long expirationTimestamp,
            Set<BoltServerAddress> readers,
            Set<BoltServerAddress> writers,
            Set<BoltServerAddress> routers ); boolean hasWriters(); boolean hasRoutersAndReaders(); Set<BoltServerAddress> readers(); Set<BoltServerAddress> writers(); Set<BoltServerAddress> routers(); long expirationTimestamp(); @Override boolean equals( Object o ); @Override int hashCode(); @Override String toString(); static ClusterComposition parse( Record record, long now );  }
@Test void hasRoutersAndReadersReturnsFalseWhenNoRouters() { ClusterComposition composition = newComposition( 1, addresses( A, B ), addresses( C, D ), addresses() ); assertFalse( composition.hasRoutersAndReaders() ); }
@Test void hasRoutersAndReadersReturnsFalseWhenNoReaders() { ClusterComposition composition = newComposition( 1, addresses(), addresses( A, B ), addresses( C, D ) ); assertFalse( composition.hasRoutersAndReaders() ); }
@Test void hasRoutersAndReadersWhenSomeReadersAndRouters() { ClusterComposition composition = newComposition( 1, addresses( A, B ), addresses( C, D ), addresses( E, F ) ); assertTrue( composition.hasRoutersAndReaders() ); }