{
Set<ServiceBindingMetadata> set = new HashSet<ServiceBindingMetadata>();
set.addAll(Arrays.asList(AA, AB, Anull));
Set<ServiceBindingSet> sbs = new HashSet<ServiceBindingSet>();
ServiceBindingSet setA = new ServiceBindingSet(A, null, 10);
sbs.add(setA);
ServiceBindingSet setB = new ServiceBindingSet(B, "localhost", 20);
sbs.add(setB);
PojoServiceBindingStore store = new PojoServiceBindingStore(sbs, set);
store.start();
Set<ServiceBindingSet> updated = new HashSet<ServiceBindingSet>(store.getServiceBindingSets());
Set<ServiceBindingMetadata> overrides = new HashSet<ServiceBindingMetadata>();
overrides.add(BA);
ServiceBindingSet newSet = new ServiceBindingSet(C, "192.168.0.10", 30, overrides);
updated.add(newSet);
ServiceBindingSet replaced = new ServiceBindingSet(B, "localhost", 50);
updated.remove(setB);
updated.add(replaced);
assertEquals(3, updated.size());
store.setServiceBindingSets(updated);