Added complex unit test. Closes #38