void ( @Nullable DeclarationDescriptor expected, @NotNull DeclarationDescriptor actual, @NotNull Configuration configuration, @Nullable File txtFile ) { RecursiveDescriptorComparator comparator = new RecursiveDescriptorComparator(configuration); String actualSerialized = comparator.serializeRecursively(actual); if (expected != null) { String expectedSerialized = comparator.serializeRecursively(expected); Assert.assertEquals("Expected and actual descriptors differ", expectedSerialized, actualSerialized); } if (txtFile != null) { KotlinTestUtils.assertEqualsToFile(txtFile, actualSerialized); } }