Version 2 of test which does not use files