Adds Unit Test for NIM Matrix construction