Add unit test and travis support