@Override
  public ScannerReport.Metadata readMetadata() {
    ensureInitialized();
    if (this.metadata == null) {
      this.metadata = delegate.readMetadata();
    }
    return this.metadata;
  }
@Test
  public void readMetadata_throws_ISE_if_no_metadata() {
    assertThatThrownBy(() -> underTest.readMetadata())
      .isInstanceOf(IllegalStateException.class);
  }