@Test @Ignore("Works in isolation but fails when executed as part of test suite") public void testUpload() throws Exception { stubFor( put(urlEqualTo("/endpoint")) .withHeader(CONTENT_TYPE, matching("mock/type")) .willReturn(aResponse().withStatus(SC_NO_CONTENT))); File file = File.createTempFile("unit-test", ".tmp"); endpoint.upload(file, ContentType.create("mock/type")); }