Search in sources :

Example 1 with AssetIndex

use of org.eclipse.dataspaceconnector.spi.asset.AssetIndex in project DataSpaceConnector by eclipse-dataspaceconnector.

the class DescriptionRequestHandlerMocks method mockAssetIndex.

public static AssetIndex mockAssetIndex() {
    AssetIndex assetIndex = mock(AssetIndex.class);
    Asset asset = Asset.Builder.newInstance().id("urn:asset:123456").build();
    when(assetIndex.findById(isA(String.class))).thenReturn(asset);
    return assetIndex;
}
Also used : AssetIndex(org.eclipse.dataspaceconnector.spi.asset.AssetIndex) Asset(org.eclipse.dataspaceconnector.spi.types.domain.asset.Asset)

Aggregations

AssetIndex (org.eclipse.dataspaceconnector.spi.asset.AssetIndex)1 Asset (org.eclipse.dataspaceconnector.spi.types.domain.asset.Asset)1