void () { JavaCodeStyleSettings original = JavaCodeStyleSettings.getInstance(getProject()); original.getImportLayoutTable().addEntry(new PackageEntry(false, "test", true)); List<String> annotations = Arrays.asList("anno1", "anno2"); original.setRepeatAnnotations(annotations); original.getPackagesToUseImportOnDemand().addEntry(new PackageEntry(false, "test2", true)); JavaCodeStyleSettings copy = (JavaCodeStyleSettings)original.clone(); assertEquals(annotations, copy.getRepeatAnnotations()); assertEquals("Import tables do not match", original.getImportLayoutTable(), copy.getImportLayoutTable()); assertEquals("On demand packages do not match", original.getPackagesToUseImportOnDemand(), copy.getPackagesToUseImportOnDemand()); copy.setRepeatAnnotations(Collections.singletonList("anno1")); assertNotSame("Changed repeated annotations should reflect the equality relation", original, copy); }