Split test logic to own module
Added check that set data is all used
Converted to new test lib