TracingSymbolProvider implements SymbolProvider { public static Builder builder() { return new Builder(); } private  TracingSymbolProvider(Builder builder); static Builder builder(); TraceFile buildTraceFile(); @Override Symbol toSymbol(Shape shape); @Override String toMemberName(MemberShape shape);  }
@Test void assertBuildDoesNotThrowWithAllFields() { Assertions.assertDoesNotThrow(() -> { TracingSymbolProvider.builder() .metadata(constructTraceMetadata()) .artifactDefinitions(constructArtifactDefinitions()) .symbolProvider(new TestSymbolProvider()) .shapeLinkCreator(constructFunction()) .build(); }); }
@Test void assertBuildDoesNotThrowWithRequiredFields() { Assertions.assertDoesNotThrow(() -> { TracingSymbolProvider.builder() .metadata(constructTraceMetadata()) .symbolProvider(new TestSymbolProvider()) .shapeLinkCreator(constructFunction()) .build(); }); }
@Test void assertBuildDoesNotThrowWithDefaultTraceMetadata() { Assertions.assertDoesNotThrow(() -> { TracingSymbolProvider.builder() .setTraceMetadataAsDefault("Java") .symbolProvider(new TestSymbolProvider()) .shapeLinkCreator(constructFunction()) .build(); }); }
@Test void assertBuildFailsWithoutSymbolProvider() { Assertions.assertThrows(IllegalStateException.class, () -> TracingSymbolProvider.builder() .metadata(constructTraceMetadata()) .shapeLinkCreator(constructFunction()) .build() ); }
@Test void assertBuildFailsWithoutTraceMetadata() { Assertions.assertThrows(IllegalStateException.class, () -> TracingSymbolProvider.builder() .symbolProvider(new TestSymbolProvider()) .shapeLinkCreator(constructFunction()) .build() ); }
@Test void assertBuildFailsWithoutShapeLinkCreator() { Assertions.assertThrows(IllegalStateException.class, () -> TracingSymbolProvider.builder() .metadata(constructTraceMetadata()) .symbolProvider(new TestSymbolProvider()) .build() ); }