DockerSteps { @Before public void before() { if (dockerClient == null && citrus.getCitrusContext().getReferenceResolver().resolveAll(DockerClient.class).size() == 1L) { dockerClient = citrus.getCitrusContext().getReferenceResolver().resolve(DockerClient.class); } }  @Before void before(); @Given("^docker-client \"([^\"]+)\"$") void setClient(String id); @When("^create container \"([^\"]+)\" from \"([^\"]+)\"$") void createContainer(String containerName, String imageTag); @When("^build image \"([^\"]+)\" from file \"([^\"]+)\"$") void buildImage(String imageTag, String fileName); @Then("^start container \"([^\"]+)\"$") void startContainer(String containerId); @Then("^stop container \"([^\"]+)\"$") void stopContainer(String containerId); @Then("^(?:the )?container \"([^\"]+)\" should be running$") void containerIsRunning(String containerId); @Then("^(?:the )?container \"([^\"]+)\" should be stopped") void containerIsStopped(String containerId);  }
@Test public void testDefaultClientInitialization() { Assert.assertNull(steps.dockerClient); steps.before(); Assert.assertNotNull(steps.dockerClient); }