Added missing unit tests. Related to #794.