Add test for serializing POJOs