Unit tests covering main modes of operation