Unit test for ColorTracker

Found a bug while writing the unit test, so fixed it as well here.