Unit tests added (#306)