Unit testing with check