Added guard for unit-testing assert.