Update tests for spring boot 2.0 compatibility

This commit is contained in:
Spencer Gibb
2017-09-26 16:31:00 -04:00
parent 7a82540f59
commit fee1e87c5a
3 changed files with 21 additions and 10 deletions

View File

@@ -107,7 +107,7 @@ public class ConfigServicePropertySourceLocatorTests {
new ByteArrayInputStream("{}".getBytes()));
this.locator.setRestTemplate(restTemplate);
this.expected.expectCause(IsInstanceOf
.<Throwable> instanceOf(HttpServerErrorException.class));
.instanceOf(IllegalArgumentException.class));
this.expected.expectMessage("fail fast property is set");
this.locator.locate(this.environment);
}
@@ -135,7 +135,7 @@ public class ConfigServicePropertySourceLocatorTests {
Mockito.when(response.getBody()).thenReturn(
new ByteArrayInputStream("".getBytes()));
this.locator.setRestTemplate(restTemplate);
this.expected.expectCause(IsNull.nullValue(Throwable.class));
this.expected.expectCause(IsInstanceOf.instanceOf(IllegalArgumentException.class));
this.expected.expectMessage("fail fast property is set");
this.locator.locate(this.environment);
}