NEW: Added new test and refactor

Signed-off-by: arturkandurengagepoint <artur.kandur@engagepoint.com>