added test predicate and updated unit tests to use it

Signed-off-by: David Noble <dnoble@splunk.com>