Added segments module unittests