Enhanced unit tests to use assert functions throughout