// Making use of Mock Objects for non-critical components helps isolate the problem you are trying to test.
dch.setCaches(new HashSet(Arrays.asList(EasyMock.createNiceMock(Address.class),
EasyMock.createNiceMock(Address.class),
EasyMock.createNiceMock(Address.class))));
List<Address> a = dch.locate("somekey", 2);
assert a.size() == 2 : "Was expecting 2 entries in the location list";
}
}