@Test public void get() { Set<String> matchingList = new HashSet<>(); matchingList.add(KEY); ReflectionTestUtils.setField(propagationByResource, "toBeDeleted", matchingList); assertEquals(matchingList, propagationByResource.get(ResourceOperation.DELETE)); assertEquals(Set.of(), propagationByResource.get(ResourceOperation.CREATE)); assertEquals(Set.of(), propagationByResource.get(ResourceOperation.UPDATE)); assertEquals(Set.of(), propagationByResource.get(ResourceOperation.NONE)); }
public final Set<T> get(final ResourceOperation type) { Set<T> result = Set.of(); switch (type) { case CREATE: result = toBeCreated; break; case UPDATE: result = toBeUpdated; break; case DELETE: result = toBeDeleted; break; default: } return result; }
PropagationByResource implements Serializable { public final Set<T> get(final ResourceOperation type) { Set<T> result = Set.of(); switch (type) { case CREATE: result = toBeCreated; break; case UPDATE: result = toBeUpdated; break; case DELETE: result = toBeDeleted; break; default: } return result; } }
PropagationByResource implements Serializable { public final Set<T> get(final ResourceOperation type) { Set<T> result = Set.of(); switch (type) { case CREATE: result = toBeCreated; break; case UPDATE: result = toBeUpdated; break; case DELETE: result = toBeDeleted; break; default: } return result; } PropagationByResource(); }
PropagationByResource implements Serializable { public final Set<T> get(final ResourceOperation type) { Set<T> result = Set.of(); switch (type) { case CREATE: result = toBeCreated; break; case UPDATE: result = toBeUpdated; break; case DELETE: result = toBeDeleted; break; default: } return result; } PropagationByResource(); final void purge(); final boolean add(final ResourceOperation type, final T key); boolean addAll(final ResourceOperation type, final Collection<T> keys); final boolean remove(final ResourceOperation type, final T key); boolean removeAll(final ResourceOperation type, final Set<T> keys); boolean removeAll(final Collection<T> keys); boolean retainAll(final Collection<T> keys); boolean contains(final ResourceOperation type, final T key); boolean contains(final T key); final Set<T> get(final ResourceOperation type); Map<T, ResourceOperation> asMap(); final void set(final ResourceOperation type, final Collection<T> keys); final void merge(final PropagationByResource<T> propByRes); void clear(); final boolean isEmpty(); Map<String, String> getOldConnObjectKeys(); String getOldConnObjectKey(final String resourceKey); void addOldConnObjectKey(final String resourceKey, final String oldConnObjectKey); @Override String toString(); }
PropagationByResource implements Serializable { public final Set<T> get(final ResourceOperation type) { Set<T> result = Set.of(); switch (type) { case CREATE: result = toBeCreated; break; case UPDATE: result = toBeUpdated; break; case DELETE: result = toBeDeleted; break; default: } return result; } PropagationByResource(); final void purge(); final boolean add(final ResourceOperation type, final T key); boolean addAll(final ResourceOperation type, final Collection<T> keys); final boolean remove(final ResourceOperation type, final T key); boolean removeAll(final ResourceOperation type, final Set<T> keys); boolean removeAll(final Collection<T> keys); boolean retainAll(final Collection<T> keys); boolean contains(final ResourceOperation type, final T key); boolean contains(final T key); final Set<T> get(final ResourceOperation type); Map<T, ResourceOperation> asMap(); final void set(final ResourceOperation type, final Collection<T> keys); final void merge(final PropagationByResource<T> propByRes); void clear(); final boolean isEmpty(); Map<String, String> getOldConnObjectKeys(); String getOldConnObjectKey(final String resourceKey); void addOldConnObjectKey(final String resourceKey, final String oldConnObjectKey); @Override String toString();  }