implement test for writeInstanceOfStatements