System.out.println("testGenericArray");
MyArray<Book<String>> bookList = new MyArray<Book<String>>();
bookList.add(new RatedBook<String>("John Marsden", "Tomorrow When The War Began", "ISBN-0192-2928", QUALITY.GOOD));
bookList.add(new RatedBook<String>("David Johnsonbaugh", "Discrete Mathematics", "ISBN-0192-2928", QUALITY.BAD));
JavaMarshaler marshaler = new JavaMarshaler();
Value output = marshaler.marshalObject(bookList);
Value expected = JSON.parse("{\"$innerArray\":[{\"$innerArray\":[{\"$innerArray\":[],\"author\":\"John Marsden\",\"title\":\"Tomorrow When The War Began\",\"test\":-99,\"quality\":\"GOOD\"},{\"$innerArray\":[],\"author\":\"David Johnsonbaugh\",\"title\":\"Discrete Mathematics\",\"test\":-99,\"quality\":\"BAD\"},{\"$innerArray\":[\"A String\"],\"author\":\"R.A.Salvatore\",\"title\":\"Homeland\",\"iSBN\":\"ISBN-0192-2928\",\"test\":-99,\"quality\":\"GOOD\"}],\"value\":100}],\"someValue\":\"this is a string\"}\n").getRoot();
System.out.println(output.toJSON());
//assertEquals(output, expected);
}