Skip to content

Commit

Permalink
feat(edc-client): refactoring after review
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-jhartmann committed May 6, 2024
1 parent 787324e commit b1d3920
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class EdcCallbackControllerTest {
@Test
void shouldStoreAgreementId() {
// arrange
String ref = """
final String ref = """
{
"id": "bc916834-61b8-4754-b3e2-1eb041d253c2",
"at": 1714645750814,
Expand Down Expand Up @@ -80,7 +80,7 @@ void shouldStoreAgreementId() {
@Test
void shouldDoNothingWhenEDRTokenIsInvalid() {
// arrange
String ref = """
final String ref = """
{
"id": "bc916834-61b8-4754-b3e2-1eb041d253c2",
"at": 1714645750814,
Expand All @@ -102,7 +102,7 @@ void shouldDoNothingWhenEDRTokenIsInvalid() {
@Test
void shouldDeserializeCallbackEDR() {
// arrange
String callbackEDR = """
final String callbackEDR = """
{
"id": "b4d5d2f6-9da4-4236-864f-2803aeda1f56",
"at": 1714647576205,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DecentralDigitalTwinRegistryClientTest {

public static final String SHELL_DESCRIPTORS = "/shell-descriptors/{aasIdentifier}";
public static final String LOOKUP_SHELLS = "/lookup/shells";
RestTemplate restTemplate = mock(RestTemplate.class);
private final RestTemplate restTemplate = mock(RestTemplate.class);
private DecentralDigitalTwinRegistryClient client;

@BeforeEach
Expand All @@ -37,7 +37,7 @@ void shouldCallForAssetAdministrationShellDescriptor() {
// given
final String contractAgreementId = "contractAgreementId";
final String endpointUrl = "url.to.host";
EndpointDataReference endpointDataReference = endpointDataReference(contractAgreementId, endpointUrl);
final EndpointDataReference endpointDataReference = endpointDataReference(contractAgreementId, endpointUrl);
when(restTemplate.exchange(any(), eq(HttpMethod.GET), any(),
eq(AssetAdministrationShellDescriptor.class))).thenReturn(
ResponseEntity.of(Optional.of(AssetAdministrationShellDescriptor.builder().build())));
Expand All @@ -53,7 +53,7 @@ void shouldCallForAssetAdministrationShellDescriptor() {
@Test
void shouldCallForAllAssetAdministrationShellIdsByAssetLink() {
// given
EndpointDataReference endpointDataReference = EndpointDataReference.Builder.newInstance()
final EndpointDataReference endpointDataReference = EndpointDataReference.Builder.newInstance()
.endpoint("url.to.host")
.contractId("contractId")
.id("test1")
Expand Down

0 comments on commit b1d3920

Please sign in to comment.