CassandraMigrationCodelab { public void run() { write(); writeBatch(); update(); update2(); get(); scan(); delete(); deleteMultiple(); } CassandraMigrationCodelab(String projectId, String instanceId, String tableId); void run(); void write(); void writeBatch(); void update(); void update2(); void get(); void scan(); void delete(); void deleteMultiple();  }
@Test public void testRunDoesNotFail() throws Exception { projectId = requireEnv("GOOGLE_CLOUD_PROJECT"); instanceId = requireEnv(INSTANCE_ENV); BigtableTableAdminSettings adminSettings = BigtableTableAdminSettings.newBuilder() .setProjectId(projectId) .setInstanceId(instanceId) .build(); adminClient = BigtableTableAdminClient.create(adminSettings); cassandraMigrationCodelab = new CassandraMigrationCodelab(projectId, instanceId, TABLE_ID); adminClient.createTable(CreateTableRequest.of(TABLE_ID).addFamily(COLUMN_FAMILY_NAME)); ByteArrayOutputStream bout = new ByteArrayOutputStream(); System.setOut(new PrintStream(bout)); cassandraMigrationCodelab.run(); String output = bout.toString(); assertThat(output, CoreMatchers.not(CoreMatchers.containsString("Error during"))); adminClient.deleteTable(TABLE_ID); }