### Question:
AbstractJdbcDataSetProvider implements DataSetProvider<T> { @Nullable @VisibleForTesting Long getOverlap(@Nonnull final DataSetOptions options) { final String overlap = SparkUtil.getOrElse(options.getOption(OVERLAP_OPTION), null); if (overlap != null) { try { return Math.abs(Long.parseLong(overlap) * 1000); } catch (final NumberFormatException e) { throw new KyloCatalogException("Invalid value for 'overlap' option: " + overlap); } } else { return null; } }  @Override boolean supportsFormat(@Nonnull final String source); @Nonnull @Override final T read(@Nonnull final KyloCatalogClient<T> client, @Nonnull final DataSetOptions options); @Override final void write(@Nonnull final KyloCatalogClient<T> client, @Nonnull final DataSetOptions options, @Nonnull final T dataSet);  }### Answer:
@Test public void getOverlap() { final DataSetOptions options = new DataSetOptions(); final MockJdbcDataSetProvider provider = new MockJdbcDataSetProvider(); Assert.assertNull("Expected overlap to be null", provider.getOverlap(options)); options.setOption("overlap", "60"); Assert.assertEquals(new Long(60000), provider.getOverlap(options)); options.setOption("overlap", "-5"); Assert.assertEquals(new Long(5000), provider.getOverlap(options)); }
@Test(expected = KyloCatalogException.class) public void getOverlapWithInvalid() { final DataSetOptions options = new DataSetOptions(); options.setOption("overlap", "a"); final MockJdbcDataSetProvider provider = new MockJdbcDataSetProvider(); provider.getOverlap(options); }