(FACT-598) Add unit tests.