improved, more generic unit tests