Add unit tests for calculator