Add unit tests for crossbar matching algorithm