### Question:
AbstractHiveDataSetProvider implements DataSetProvider<T> { @Nonnull @Override public final T read(@Nonnull final KyloCatalogClient<T> client, @Nonnull final DataSetOptions options) { final String tableName = DataSetUtil.getOptionOrThrow(options, KyloCatalogConstants.PATH_OPTION, "Table name must be defined as path"); addJars(client, options.getJars()); return loadFromTable(client, tableName); }  @Override final boolean supportsFormat(@Nonnull final String format); @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 read() { final DataSetOptions options = new DataSetOptions(); options.addJar("http: options.setOption(KyloCatalogConstants.PATH_OPTION, "default.mytable"); dataFrame = Mockito.mock(DataFrame.class); final MockHiveDataSetProvider provider = new MockHiveDataSetProvider(); final DataFrame result = provider.read(Mockito.mock(KyloCatalogClient.class), options); Assert.assertEquals(dataFrame, result); Mockito.verify(sqlContext).sql("ADD JAR http: }
@Test(expected = MissingOptionException.class) public void readWithoutPath() { final MockHiveDataSetProvider provider = new MockHiveDataSetProvider(); provider.read(Mockito.mock(KyloCatalogClient.class), new DataSetOptions()); }