WORDS-341 - create tests for ExportController.java class, some refactoring