I was facing the same problem with wireMock while mocking the rest API calls.
Earlier I was defining the server like this:
WireMockServer wireMockServer = null;
But it should be defined like as shown below:
@Rule
public WireMockRule wireMockRule = new WireMockRule(8089);