Refactored code to enable its utilization in Junit

No match.