SequentialProtocolProducer implements ProtocolProducer { @Override public String toString() { return "SequentialProtocolProducer{" + ", protocolProducers=" + protocolProducers + '}'; } SequentialProtocolProducer(List<ProtocolProducer> protocols); @Override void getNextProtocols(
      ProtocolCollection<ResourcePoolT> protocolCollection); @Override boolean hasNextProtocols(); @Override String toString();  }
@Test public void testToString() { SequentialProtocolProducer sequentialProtocolProducer = new SequentialProtocolProducer( Collections.singletonList( new SingleProtocolProducer<>(new DummyBooleanNotProtocol(null)))); String toString = sequentialProtocolProducer.toString(); Assert.assertThat(toString, StringContains.containsString("SequentialProtocolProducer")); Assert.assertThat(toString, StringContains.containsString("SingleProtocolProducer")); Assert.assertThat(toString, StringContains.containsString("DummyBooleanNotProtocol")); Assert.assertThat(sequentialProtocolProducer.toString(), Is.is(toString)); }