Added various unit tests