Integer currentHp = 28;
Integer ac = 15;
Integer acFlat = 13;
Integer acTouch = 12;
Integer initMod = 2;
PathfinderCharacter character = new PathfinderCharacter("test-name",
totalHp, currentHp, ac, acTouch, acFlat, initMod, img.getId());
BeanDocument doc = new BeanDocument(CampaignClient.getInstance()
.getRootDirectory(), character.getName(),
DocumentTypeConstant.CHARACTER, character);
doc = addBean(doc);
character = doc.getBean();
assertEquals("Total hp should be same", totalHp, character.getTotalHp());
assertEquals("Current hp should be same", currentHp,
character.getCurrentHp());
assertEquals("ac should be same", ac, character.getAc());
assertEquals("ac flat footed should be same", acFlat,
character.getAcFlatFooted());
assertEquals("ac touch should be same", acTouch, character.getAcTouch());
assertEquals("init modifier should be same", initMod,
character.getInitMod());
totalHp = totalHp - 4;
currentHp = currentHp - 13;
ac = ac - 1;
acFlat = acFlat + 1;
acTouch = acTouch - 2;
initMod = initMod - 2;
character.setTotalHp(totalHp);
character.setCurrentHp(currentHp);
character.setAc(ac);
character.setAcFlatFooted(acFlat);
character.setAcTouch(acTouch);
character.setInitMod(initMod);
sleep(300);
assertEquals("Total hp should be same", totalHp, character.getTotalHp());
assertEquals("Current hp should be same", currentHp,
character.getCurrentHp());
assertEquals("ac should be same", ac, character.getAc());
assertEquals("ac flat footed should be same", acFlat,
character.getAcFlatFooted());
assertEquals("ac touch should be same", acTouch, character.getAcTouch());
assertEquals("init modifier should be same", initMod,
character.getInitMod());
}