void () { final TrelloRepository repository = new TrelloRepository(new TrelloRepositoryType()); final TrelloBoard board = new TrelloBoard(); // Otherwise it will be replaced by TrelloRepository.UNSPECIFIED_BOARD excluded from serialization board.setId("realID"); repository.setCurrentBoard(board); final TrelloList list = new TrelloList(); list.setId("realID"); repository.setCurrentList(list); repository.setCurrentUser(new TrelloUser()); XmlSerializer.serialize(repository); }