ExecutableRampDependencyMap extends BaseRefreshableMap<String, ExecutableRampDependency> { @Override public ExecutableRampDependencyMap clone() { return (ExecutableRampDependencyMap) super.clone(); } private  ExecutableRampDependencyMap(); static ExecutableRampDependencyMap createInstance(); synchronized ExecutableRampDependencyMap add(@NotNull final String dependency,
      final String defaultValue, final String jobTypes); String getDefaultValue(@NotNull final String dependency); Map<String, String> getDefaultValues(@NotNull final Set<String> dependencies); synchronized boolean isValidJobType(@NotNull final String dependency,
      @NotNull final String jobType); @Override ExecutableRampDependencyMap clone();  }
@Test public void testClone() { executableMap.add(DEPENDENCY_NAME1, DEPENDENCY_VALUE11, JOB_TYPE_SPARK); Assert.assertEquals(1, executableMap.size()); ExecutableRampDependencyMap clonedExecutableMap = executableMap.clone(); Assert.assertEquals(executableMap, clonedExecutableMap); Assert.assertEquals(DEPENDENCY_VALUE11, executableMap.getDefaultValue(DEPENDENCY_NAME1)); Assert.assertEquals(DEPENDENCY_VALUE11, clonedExecutableMap.getDefaultValue(DEPENDENCY_NAME1)); ExecutableRampDependencyMap novaExecutableMap = ExecutableRampDependencyMap.createInstance(); novaExecutableMap.add(DEPENDENCY_NAME1, DEPENDENCY_VALUE12, JOB_TYPE_SPARK_PIG); executableMap.refresh(novaExecutableMap); Assert.assertEquals(1, executableMap.size()); Assert.assertEquals(DEPENDENCY_VALUE12, executableMap.getDefaultValue(DEPENDENCY_NAME1)); Assert.assertEquals(1, clonedExecutableMap.size()); Assert.assertEquals(DEPENDENCY_VALUE12, clonedExecutableMap.getDefaultValue(DEPENDENCY_NAME1)); }