Corrected implementation of test