Fixed implementation of unit-tests.