ported unit tests
added license header