*/
public void test_OptsAfterCloseFail() {
Exception ex = null;
try{
StringWriter w = new StringWriter();
JSONWriter jWriter = new JSONWriter(w);
jWriter.array();
jWriter.close();
// This should die.
jWriter.endArray();
}catch(Exception ex1){
ex = ex1;
}
assertTrue(ex instanceof IllegalStateException);
}