Added new unit tests and integration tests