Added units tests