### Question:
StandardInteractiveSpacesDomainCloner implements InteractiveSpacesDomainCloner { @Override public LiveActivity cloneLiveActivity(LiveActivity src) { String id = src.getId(); LiveActivity clone = liveActivityClones.get(id); if (clone != null) { return clone; } clone = activityRepository.newLiveActivity(); liveActivityClones.put(id, clone); clone.setName(namePrefix + " " + src.getName()); clone.setDescription(src.getDescription()); clone.setActivity(src.getActivity()); clone.setController(getController(src.getController())); clone.setMetadata(src.getMetadata()); clone.setConfiguration(cloneConfiguration(src.getConfiguration())); return clone; } StandardInteractiveSpacesDomainCloner(ActivityRepository activityRepository); @Override void setNamePrefix(String namePrefix); @Override void setControllerMap(Map<SpaceController, SpaceController> controllerMap); @Override void saveClones(); @Override LiveActivity cloneLiveActivity(LiveActivity src); @Override LiveActivity getClonedLiveActivity(String srcId); @Override ActivityConfiguration cloneConfiguration(ActivityConfiguration src); @Override LiveActivityGroup cloneLiveActivityGroup(LiveActivityGroup src); @Override LiveActivityGroup getClonedLiveActivityGroup(String srcId); @Override Space cloneSpace(Space src); @Override Space getClonedSpace(String srcId);  }### Answer:
@Test public void testLiveActivityCopyNoControllerMap() { ActivityConfiguration srcConfiguration = new SimpleActivityConfiguration(); srcConfiguration.setDescription(DESCRIPTION); srcConfiguration.addParameter(new SimpleConfigurationParameter("foo", "bar")); srcConfiguration.addParameter(new SimpleConfigurationParameter("bletch", "spam")); LiveActivity srcLiveActivity = newLiveActivity(activity1, controller1); srcLiveActivity.setConfiguration(srcConfiguration); LiveActivity clonedLiveActivity = cloner.cloneLiveActivity(srcLiveActivity); compareLiveActivity(srcLiveActivity, clonedLiveActivity, controller1); }
@Test public void testLiveActivityCopyNoControllerMapCheckCache() { LiveActivity srcLiveActivity = newLiveActivity(activity1, controller1); LiveActivity clonedLiveActivity1 = cloner.cloneLiveActivity(srcLiveActivity); LiveActivity clonedLiveActivity2 = cloner.cloneLiveActivity(srcLiveActivity); assertEquals(clonedLiveActivity1, clonedLiveActivity2); }