UserRoleParser { public void parseUserRoles(XMLEventReader reader, ParseSession status) throws XMLStreamException { while (reader.nextTag().isStartElement()) { parseUserRole(reader, status); } } UserRoleParser(UserRoleParserDao dao, PrimaryKeyCache keyCache, BackupEntityType userRoleBackupEntityType); void parseUserRoles(XMLEventReader reader, ParseSession status);  }
@Test public void shouldParseUserRoles() throws XMLStreamException { parser.parseUserRoles(eventReader, status); assertEquals(6, daoValidator.getPersistCount()); assertEquals(6, status.getInsertions().get(userRoleBackupEntityType).intValue()); }