@Test(expected = ClassCastException.class)
  public void testFileSystemError() throws Exception {
    // Bad file system object, ClassCastException should occur during record writer init
    conf.set("fs.raw.impl", Object.class.getName());

    StrictDelimitedInputWriter writer = StrictDelimitedInputWriter.newBuilder()
            .withFieldDelimiter(',')
            .build();

    HiveStreamingConnection connection = HiveStreamingConnection.newBuilder()
            .withDatabase(dbName)
            .withTable(tblName)
            .withStaticPartitionValues(partitionVals)
            .withAgentInfo("UT_" + Thread.currentThread().getName())
            .withRecordWriter(writer)
            .withHiveConf(conf)
            .connect();

    connection.beginTransaction();
  }
check that transactions that have not heartbeated and timedout get properly aborted

@throws Exception
streaming/src/test/org/apache/hive/streaming/TestStreaming.java