HCatalogIO { public static Write write() { return new AutoValue_HCatalogIO_Write.Builder().setBatchSize(BATCH_SIZE).build(); } private  HCatalogIO(); static Write write(); static Read read();  }
@Test public void testWriteFailureTableDoesNotExist() { thrown.expectCause(isA(UserCodeException.class)); thrown.expectMessage(containsString("org.apache.hive.hcatalog.common.HCatException")); thrown.expectMessage(containsString("NoSuchObjectException")); defaultPipeline .apply(Create.of(buildHCatRecords(TEST_RECORDS_COUNT))) .apply( HCatalogIO.write() .withConfigProperties(getConfigPropertiesAsMap(service.getHiveConf())) .withTable("myowntable")); defaultPipeline.run(); }
@Test public void testWriteFailureValidationTable() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("withTable() is required"); HCatalogIO.write() .withConfigProperties(getConfigPropertiesAsMap(service.getHiveConf())) .expand(null); }
@Test public void testWriteFailureValidationConfigProp() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("withConfigProperties() is required"); HCatalogIO.write().withTable("myowntable").expand(null); }