Skip to content

Commit add8c6f

Browse files
committed
Align HypermediaAutoConfigurationTests with latest HATEOAS API changes
See gh-15939
1 parent b28c31d commit add8c6f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hateoas/HypermediaAutoConfigurationTests.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.boot.autoconfigure.hateoas;
1818

19+
import java.util.Optional;
20+
1921
import org.junit.After;
2022
import org.junit.Test;
2123

@@ -69,8 +71,9 @@ public void linkDiscoverersCreated() {
6971
this.context.refresh();
7072
LinkDiscoverers discoverers = this.context.getBean(LinkDiscoverers.class);
7173
assertThat(discoverers).isNotNull();
72-
LinkDiscoverer discoverer = discoverers.getLinkDiscovererFor(MediaTypes.HAL_JSON);
73-
assertThat(discoverer).isInstanceOf(HalLinkDiscoverer.class);
74+
Optional<LinkDiscoverer> discoverer = discoverers
75+
.getLinkDiscovererFor(MediaTypes.HAL_JSON);
76+
assertThat(discoverer).containsInstanceOf(HalLinkDiscoverer.class);
7477
}
7578

7679
@Test

0 commit comments

Comments
 (0)