@Test
   void testCreateVolumeConfig() throws Exception {
      final VolumeConfiguration config =
          new VolumeConfiguration.Builder()
              .name("testVolume")
              .driver("test")
              .opts(withMap("opts"))
              .labels(withMap("labels"))
              .build();

      Mockito.doReturn("testVolume").when(docker).createVolume(Mockito.any(VolumeCreateConfig.class));

      String volume = new VolumeService(docker).createVolume(config);
      Assertions.assertEquals("testVolume", volume);

      ArgumentCaptor<VolumeCreateConfig> volumeCreateConfigCaptor = ArgumentCaptor.forClass(VolumeCreateConfig.class);
      Mockito.verify(docker).createVolume(volumeCreateConfigCaptor.capture());
      VolumeCreateConfig vcc= volumeCreateConfigCaptor.getValue();
      Assertions.assertEquals("testVolume", vcc.getName());
      JsonObject vccJson = JsonFactory.newJsonObject(vcc.toJson());
      Assertions.assertEquals("test", vccJson.get("Driver").getAsString());
   }
Basic Unit Tests for {@link VolumeService}

 @author Tom Burton
 @version Dec 16, 2016
src/test/java/io/fabric8/maven/docker/service/VolumeServiceTest.java