@Test(expected = RuntimeException.class)
public void testThrowsRuntimeExceptionIfFailedToCloseService() throws Exception {

    doThrow(new IOException("Failed to close"))
            .when(service).close();
    neow3j.shutdown();
}