unit tests for exclusion function