Adding unit tests for triangle method