### Question:
CascadingUtil { public static void linkCascadingProjectsToChild(ICascadingJob cascadingProject, String childProjectName) throws IOException { if (cascadingProject != null) { cascadingProject.addCascadingChild(childProjectName); if (cascadingProject.hasCascadingProject()) { linkCascadingProjectsToChild(cascadingProject.getCascadingProject(), childProjectName); } } }  static IProjectProperty getProjectProperty(Job currentJob, String key); static StringProjectProperty getStringProjectProperty(Job currentJob, String key); static BaseProjectProperty getBaseProjectProperty(Job currentJob, String key); static ExternalProjectProperty getExternalProjectProperty(Job currentJob, String key); static CopyOnWriteListProjectProperty getCopyOnWriteListProjectProperty(Job currentJob, String key); static ResultProjectProperty getResultProjectProperty(Job currentJob, String key); static BooleanProjectProperty getBooleanProjectProperty(Job currentJob, String key); static IntegerProjectProperty getIntegerProjectProperty(Job currentJob, String key); static LogRotatorProjectProperty getLogRotatorProjectProperty(Job currentJob, String key); static DescribableListProjectProperty getDescribableListProjectProperty(Job currentJob, String key); static AxisListProjectProperty getAxesListProjectProperty(Job currentJob, String key); static SCMProjectProperty getScmProjectProperty(Job currentJob, String key); static TriggerProjectProperty getTriggerProjectProperty(Job currentJob, String key); @SuppressWarnings("unchecked") static T getProjectProperty(ICascadingJob currentJob, String key, Class<T> clazz); @SuppressWarnings("unchecked") static boolean hasCyclicCascadingLink(Job cascadingCandidate, Set<String> cascadingChildren); static boolean unlinkProjectFromCascadingParents(ICascadingJob cascadingProject, String projectToUnlink); static void linkCascadingProjectsToChild(ICascadingJob cascadingProject, String childProjectName); static void renameCascadingChildLinks(ICascadingJob cascadingProject, String oldName, String newName); static void renameCascadingParentLinks(final String oldName, final String newName); @SuppressWarnings("unchecked") static List<Job> getCascadingParents(Class<T> type, Job currentJob); @SuppressWarnings("unchecked") static void buildExternalProperties(StaplerRequest req, JSONObject json,
            List<Descriptor<T>> descriptors, Job owner); @SuppressWarnings("unchecked") static void setChildrenTrigger(Job job, TriggerDescriptor descriptor, String key, StaplerRequest req,
            JSONObject json); @SuppressWarnings("unchecked") static void setParameterDefinitionProperties(Job job,
            String key,
            CopyOnWriteList<ParametersDefinitionProperty> parameterDefinitionProperties); static boolean isCascadableJobProperty(JobPropertyDescriptor d);  }### Answer:
@Test public void testLinkCascadingProjectsToChild() throws Exception { FreeStyleProject project1 = new FreeStyleProjectMock("project1"); FreeStyleProjectMock child1 = new FreeStyleProjectMock("child1"); child1.setCascadingProject(project1); String cascadingName = "newCascadingProject"; CascadingUtil.linkCascadingProjectsToChild(null, cascadingName); assertFalse(project1.getCascadingChildrenNames().contains(cascadingName)); assertFalse(child1.getCascadingChildrenNames().contains(cascadingName)); CascadingUtil.linkCascadingProjectsToChild(project1, cascadingName); assertTrue(project1.getCascadingChildrenNames().contains(cascadingName)); project1 = new FreeStyleProjectMock("project1"); child1 = new FreeStyleProjectMock("child1"); child1.setCascadingProject(project1); CascadingUtil.linkCascadingProjectsToChild(child1, cascadingName); assertTrue(project1.getCascadingChildrenNames().contains(cascadingName)); assertTrue(child1.getCascadingChildrenNames().contains(cascadingName)); }