@@ -0,0 +1,1463 @@
+package org.datacite.mds.util;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.util.Set;%0A%0Aimport org.apache.commons.collections.Predicate;%0Aimport org.datacite.mds.domain.Allocator;%0Aimport org.datacite.mds.domain.Datacentre;%0Aimport org.datacite.mds.domain.Prefix;%0Aimport org.datacite.mds.test.TestUtils;%0Aimport org.junit.Test;%0A%0Apublic class FilterPredicatesTest %7B%0A    @Test%0A    public void testAllocatorOrDatacentreContainsPrefixPredicate() %7B%0A        Prefix prefix = TestUtils.createPrefix(%2210.5072%22);%0A        Prefix anotherPrefix = TestUtils.createPrefix(%2210.0000%22);%0A        Set%3CPrefix%3E prefixes = TestUtils.createPrefixes(%2210.5072%22, %2210.5432%22);%0A        Allocator allocator = TestUtils.createAllocator(%22AL%22);%0A        allocator.setPrefixes(prefixes);%0A        Datacentre datacentre = TestUtils.createDatacentre(%22AL.DC%22, allocator);%0A        datacentre.setPrefixes(prefixes);%0A        %0A        assertTrue(prefixes.contains(prefix));%0A        assertFalse(prefixes.contains(anotherPrefix));%0A        %0A        Predicate predicate = FilterPredicates.getAllocatorOrDatacentreContainsPrefixPredicate(prefix);%0A        assertTrue(predicate.evaluate(allocator));%0A        assertTrue(predicate.evaluate(datacentre));%0A%0A        predicate = FilterPredicates.getAllocatorOrDatacentreContainsPrefixPredicate(anotherPrefix);%0A        assertFalse(predicate.evaluate(allocator));%0A        assertFalse(predicate.evaluate(datacentre));%0A%7D%0A%7D%0A

add unit test for FilterPredicates