PresenceDocument doc = (PresenceDocument) presentity.getState().getContent();
assertEquals(presentity.getNeutralState().getContent().toString(),
doc.toString());
PresenceDocument doc1 = PresenceDocument.Factory.newInstance();
Tuple tuple1 = doc1.addNewPresence().addNewTuple();
tuple1.setId("tuple1");
tuple1.addNewStatus().setBasic(Basic.OPEN);
SoftState state1 = presentity.addState(PresenceEventPackage.PIDF, doc1, 60);
doc = (PresenceDocument) presentity.getState().getContent();
assertEquals(1, doc.getPresence().getTupleArray().length);
assertEquals("tuple1",
doc.getPresence().getTupleArray(0).getId());
assertEquals(Basic.OPEN,
doc.getPresence().getTupleArray(0).getStatus().getBasic());
PresenceDocument doc2 = PresenceDocument.Factory.newInstance();
Tuple tuple2 = doc2.addNewPresence().addNewTuple();
tuple2.setId("tuple2");
tuple2.addNewStatus().setBasic(Basic.CLOSED);
SoftState state2 = presentity.addState(PresenceEventPackage.PIDF, doc2, 60);
doc = (PresenceDocument) presentity.getState().getContent();
assertEquals(2, doc.getPresence().getTupleArray().length);
assertEquals("tuple1",