### Question:
StudyActivity extends AbstractNamedEntity<StudyActivity> implements TypeWithNotes { public void setUsedBy(Set<UsedBy> usedBy) { Set<UsedBy> oldValue = d_usedBy; d_usedBy = new HashSet<UsedBy>(usedBy); firePropertyChange(PROPERTY_USED_BY, oldValue, d_usedBy); } StudyActivity(String name, Activity activity); @Override Set<? extends Entity> getDependencies(); void setActivity(Activity activity); Activity getActivity(); void setUsedBy(Set<UsedBy> usedBy); Set<UsedBy> getUsedBy(); ObservableList<Note> getNotes(); boolean deepEquals(Entity obj); @Override boolean equals(Object obj); @Override StudyActivity clone(); boolean isComplete(); void setName(String name); static final String PROPERTY_ACTIVITY; static final String PROPERTY_USED_BY; }### Answer:
@Test public void testSetUsedBy() { UsedBy ub = new UsedBy(d_arm, d_epoch); JUnitUtil.testSetter(d_randomization, StudyActivity.PROPERTY_USED_BY, Collections.emptySet(), Collections.singleton(ub)); }