Fixed integral test

Integral test always passed. Even if there was error.