FIx broken test

This commit is contained in:
James Agnew 2018-11-07 11:26:23 +01:00
parent 62145e1b74
commit 2656d008d6
1 changed files with 2 additions and 4 deletions

View File

@ -33,6 +33,7 @@ import java.util.concurrent.TimeUnit;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.contains;
public class ServerExceptionDstu3Test { public class ServerExceptionDstu3Test {
@ -88,10 +89,7 @@ public class ServerExceptionDstu3Test {
String responseContent = new String(responseContentBytes, Charsets.UTF_8); String responseContent = new String(responseContentBytes, Charsets.UTF_8);
ourLog.info(status.getStatusLine().toString()); ourLog.info(status.getStatusLine().toString());
ourLog.info(responseContent); ourLog.info(responseContent);
assertThat(responseContent, containsString("El nombre está vacío"));
assertEquals(400, status.getStatusLine().getStatusCode());
assertEquals("BAR BAR", status.getFirstHeader("X-Foo").getValue());
assertThat(status.getFirstHeader("X-Powered-By").getValue(), containsString("HAPI FHIR"));
} finally { } finally {
IOUtils.closeQuietly(status.getEntity().getContent()); IOUtils.closeQuietly(status.getEntity().getContent());
} }