Added automated unit tests