@Test void shouldThrowIllegalArgumentExceptionForUnknownImplementationsOfIdentifiers() { Identifier id = new UnknownIdentifier(); Assertions.assertThrows(IllegalArgumentException.class, () -> ProtoUtil.serialize(id)); }
static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); }
ProtoUtil { static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); } }
ProtoUtil { static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); } private  ProtoUtil(); }
ProtoUtil { static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); } private  ProtoUtil(); static Workflow.WorkflowTemplate serialize(WorkflowTemplate template); }
ProtoUtil { static IdentifierOuterClass.Identifier serialize(Identifier id) { IdentifierOuterClass.ResourceType type = getResourceType(id); return IdentifierOuterClass.Identifier.newBuilder() .setResourceType(type) .setDomain(id.domain()) .setProject(id.project()) .setName(id.name()) .setVersion(id.version()) .build(); } private  ProtoUtil(); static Workflow.WorkflowTemplate serialize(WorkflowTemplate template);  }