Move dependencies parsing to method for unit testing
Add unit tests for dependencies parsing