Minor issue solving with exceptions and factory. AH-75
Separated unit tests from integration tests. AH-75