SyntheticBoundedSource extends OffsetBasedSource<KV<byte[], byte[]>> { @Override public void validate() { super.validate(); sourceOptions.validate(); } SyntheticBoundedSource(SyntheticSourceOptions sourceOptions);  SyntheticBoundedSource(
      long startOffset, long endOffset, SyntheticSourceOptions sourceOptions); @Override Coder<KV<byte[], byte[]>> getDefaultOutputCoder(); @Override // TODO: test cases where the source size could not be estimated (i.e., return 0). // TODO: test cases where the key size and value size might differ from record to record. // The key size and value size might have their own distributions. long getBytesPerOffset(); @Override void validate(); @Override String toString(); @Override final SyntheticBoundedSource createSourceForSubrange(long start, long end); @Override long getMaxEndOffset(PipelineOptions options); @Override SyntheticSourceReader createReader(PipelineOptions pipelineOptions); @Override List<SyntheticBoundedSource> split(long desiredBundleSizeBytes, PipelineOptions options);  }
@Test public void testSourceOptionsWithNegativeNumRecords() throws Exception { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("numRecords should be a non-negative number, but found -100"); testSourceOptions.numRecords = -100; testSourceOptions.validate(); }