Using assertion effectively