DependencyGraphTraceProviderResource extends AbstractDataResource { @GET @Path("build") public FudgeMsgEnvelope build() { DependencyGraphBuildTrace result = _provider.getTrace(_properties); MutableFudgeMsg fudgeMsg = new FudgeSerializer(_fudgeContext).objectToFudgeMsg(result); return new FudgeMsgEnvelope(fudgeMsg); } DependencyGraphTraceProviderResource(final DependencyGraphTraceProvider provider, final FudgeContext fudgeContext); private  DependencyGraphTraceProviderResource(DependencyGraphTraceProvider provider, FudgeContext fudgeContext, DependencyGraphTraceBuilderProperties properties); @GET Response getHateaos(@Context UriInfo uriInfo); @Path("valuationTime/{valuationTime}") DependencyGraphTraceProviderResource setValuationTime(@PathParam("valuationTime") final String valuationTime); @Path("resolutionTime/{resolutionTime}") DependencyGraphTraceProviderResource setResolutionTime(@PathParam("resolutionTime") final String resolutionTime); @Path("calculationConfigurationName/{calculationConfigurationName}") DependencyGraphTraceProviderResource setCalculationConfigurationName(@PathParam("calculationConfigurationName") final String calculationConfigurationName); @Path("defaultProperties/{defaultProperties}") DependencyGraphTraceProviderResource setDefaultProperties(@PathParam("defaultProperties") final String defaultProperties); @Path("value/{valueName}/{targetType}/{targetId}") DependencyGraphTraceProviderResource setValueRequirementByUniqueId(@PathParam("valueName") final String valueName, @PathParam("targetType") final String targetType,
      @PathParam("targetId") final String targetId); @Path("requirement/{valueName}/{targetType}/{targetId}") DependencyGraphTraceProviderResource setValueRequirementByExternalId(@PathParam("valueName") final String valueName, @PathParam("targetType") final String targetType,
      @PathParam("targetId") final String targetId); @Path("marketDataSnapshot/{snapshotId}") DependencyGraphTraceProviderResource setMarketDataSnapshot(@PathParam("snapshotId") final String snapshotId); @Path("marketDataLiveDefault") DependencyGraphTraceProviderResource setMarketDataLiveDefault(); @Path("marketDataLive/{dataSource}") DependencyGraphTraceProviderResource setMarketDataLive(@PathParam("dataSource") final String dataSource); @Path("marketDataHistorical/{localDate}/{timeSeriesResolverKey}") DependencyGraphTraceProviderResource setMarketDataHistorical(@PathParam("localDate") final String localDateStr, @PathParam("timeSeriesResolverKey") final String timeSeriesResolverKey); @GET @Path("build") FudgeMsgEnvelope build(); static URI uriCalculationConfigurationName(URI baseUri, String calculationConfigurationName); static URI uriValuationTime(URI baseUri, Instant valuationInstant); static URI uriResolutionTime(URI baseUri, VersionCorrection resolutionTime); static URI uriDefaultProperties(URI baseUri, ValueProperties defaultProperties); static URI uriMarketData(URI baseUri, List<MarketDataSpecification> marketData); static URI uriValueRequirementByUniqueId(URI baseUri, String valueName, String targetType, UniqueId uniqueId); static URI uriValueRequirementByExternalId(URI baseUri, String valueName, String targetType, ExternalId externalId); static URI uriBuild(URI baseUri);  }
@Test public void build() { when(_provider.getTrace(_resource.getProperties())).thenReturn(_sampleResult); FudgeMsgEnvelope result = _resource.build(); verify(_provider).getTrace(_resource.getProperties()); assertNotNull(result); }