docs: @SuppressWarnings("unchecked")
  	public <T extends StatementDocument> T updateStatements(T currentDocument,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary) throws MediaWikiApiErrorException, IOException {
  
  		StatementUpdate statementUpdate = new StatementUpdate(currentDocument,
  				addStatements, deleteStatements);
  		statementUpdate.setGuidGenerator(guidGenerator);
  		
  		if (statementUpdate.isEmptyEdit()) {
  			return currentDocument;
  		} else {
  			return (T) this.wbEditingAction.wbEditEntity(currentDocument
  				.getEntityId().getId(), null, null, null, statementUpdate
  				.getJsonUpdateString(), false, this.editAsBot, currentDocument
  				.getRevisionId(), summary);
  		}
  	}