Repository: docker-java/docker-java
Pull request #210 (2015-05-05 20:55:28)

Add public constructor and Javadoc to api.model.Event


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 33607c66..b7a38646 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,11 +3,6 @@ Change Log
 Latest SNAPSHOT
 ---
 
-* [#205](https://github.com/docker-java/docker-java/issues/205) Access mode of VolumesRW incorrectly deserialized
-* [#204] (https://github.com/docker-java/docker-java/pull/204) Added support to use the credentials from .dockercfg during build
-* [#203](https://github.com/docker-java/docker-java/issues/203) Missing 'MacAddress' option in create container command
-* [#197](https://github.com/docker-java/docker-java/pull/197) Allow for null bindings
-
 v1.2.0
 ---
 * [#194](https://github.com/docker-java/docker-java/pull/194) Fixed remove intermediate containers bug on build goal
diff --git a/README.md b/README.md
index bbafd8a6..b7e9c621 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
 
 Java API client for [Docker](http://docs.docker.io/ "Docker")
 
-Supports a subset of the Docker Client API v1.17, Docker Server version 1.5.0
+Supports a subset of the Docker Client API v1.16, Docker Server version 1.4.1
 
 <b>The current implementation is based on Jersey 2.x and therefore classpath incompatible with older Jersey 1.x dependent libraries!</b>
 
@@ -64,7 +64,7 @@ Run build without integration tests:
     <dependency>
           <groupId>com.github.docker-java</groupId>
           <artifactId>docker-java</artifactId>
-          <version>1.2.0</version>
+          <version>1.0.0</version>
     </dependency>
 
 ### Latest SNAPSHOT version
@@ -74,7 +74,7 @@ You can find the latest SNAPSHOT version including javadoc and source files on [
     <dependency>
           <groupId>com.github.docker-java</groupId>
           <artifactId>docker-java</artifactId>
-          <version>1.2.1-SNAPSHOT</version>
+          <version>1.0.1-SNAPSHOT</version>
     </dependency>
 
 ## Documentation
diff --git a/src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java b/src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java
index 708e3139..a2a6dc85 100644
--- a/src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java
+++ b/src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java
@@ -14,7 +14,6 @@ import com.github.dockerjava.api.model.Ports;
 import com.github.dockerjava.api.model.RestartPolicy;
 import com.github.dockerjava.api.model.Volume;
 import com.github.dockerjava.api.model.VolumesFrom;
-import com.github.dockerjava.core.command.CreateContainerCmdImpl;
 
 public interface CreateContainerCmd extends DockerCmd<CreateContainerResponse>{
 
@@ -64,8 +63,6 @@ public interface CreateContainerCmd extends DockerCmd<CreateContainerResponse>{
 	public Link[] getLinks();
 	
 	public LxcConf[] getLxcConf();
-	
-	public String getMacAddress();
 
 	public long getMemoryLimit();
 
@@ -95,7 +92,7 @@ public interface CreateContainerCmd extends DockerCmd<CreateContainerResponse>{
 
 	public boolean isAttachStdout();
 
-	public boolean isNetworkDisabled();
+	public boolean isDisableNetwork();
 	
 	public Boolean isPrivileged();
 	
@@ -142,7 +139,7 @@ public interface CreateContainerCmd extends DockerCmd<CreateContainerResponse>{
 	 */
 	public CreateContainerCmd withDevices(Device... devices);
 
-	public CreateContainerCmd withNetworkDisabled(boolean disableNetwork);
+	public CreateContainerCmd withDisableNetwork(boolean disableNetwork);
 
 	/**
 	 * Set custom DNS servers
@@ -240,6 +237,4 @@ public interface CreateContainerCmd extends DockerCmd<CreateContainerResponse>{
 	
 	public CreateContainerCmd withWorkingDir(String workingDir);
 
-	public CreateContainerCmd withMacAddress(String macAddress);
-
 }
diff --git a/src/main/java/com/github/dockerjava/api/command/InspectContainerResponse.java b/src/main/java/com/github/dockerjava/api/command/InspectContainerResponse.java
index f9565689..c86e13c5 100644
--- a/src/main/java/com/github/dockerjava/api/command/InspectContainerResponse.java
+++ b/src/main/java/com/github/dockerjava/api/command/InspectContainerResponse.java
@@ -77,7 +77,7 @@ public class InspectContainerResponse {
     private VolumeBinds volumes;
 
     @JsonProperty("VolumesRW")
-    private VolumesRW volumesRW;
+    private Volumes volumesRW;
 
     public String getId() {
         return id;
@@ -125,8 +125,8 @@ public class InspectContainerResponse {
     }
 
     @JsonIgnore
-    public VolumeRW[] getVolumesRW() {
-        return volumesRW.getVolumesRW();
+    public Volume[] getVolumesRW() {
+        return volumesRW.getVolumes();
     }
 
     public String getHostnamePath() {
diff --git a/src/main/java/com/github/dockerjava/api/command/LogContainerCmd.java b/src/main/java/com/github/dockerjava/api/command/LogContainerCmd.java
index 05e10855..74512b39 100644
--- a/src/main/java/com/github/dockerjava/api/command/LogContainerCmd.java
+++ b/src/main/java/com/github/dockerjava/api/command/LogContainerCmd.java
@@ -1,9 +1,9 @@
 package com.github.dockerjava.api.command;
 
-import com.github.dockerjava.api.NotFoundException;
-
 import java.io.InputStream;
 
+import com.github.dockerjava.api.NotFoundException;
+
 /**
  * Get container logs
  *
@@ -18,10 +18,6 @@ import java.io.InputStream;
  *            Defaults to false.
  * @param tail
  * 			  - `all` or `<number>`, Output specified number of lines at the end of logs
- *
- * Consider wrapping any input stream you get with a frame reader to make reading frame easier.
- *
- * @see com.github.dockerjava.core.command.FrameReader
  */
 public interface LogContainerCmd extends DockerCmd<InputStream>{
 
diff --git a/src/main/java/com/github/dockerjava/api/model/AccessMode.java b/src/main/java/com/github/dockerjava/api/model/AccessMode.java
index a893e7f3..a1f53f57 100644
--- a/src/main/java/com/github/dockerjava/api/model/AccessMode.java
+++ b/src/main/java/com/github/dockerjava/api/model/AccessMode.java
@@ -15,14 +15,6 @@ public enum AccessMode {
 	 * The default {@link AccessMode}: {@link #rw}
 	 */
 	public static final AccessMode DEFAULT = rw;
-	
-	public static final AccessMode fromBoolean(boolean accessMode) {
-		return accessMode ? rw : ro;
-	}
-	
-	public final boolean toBoolean() {
-		return this.equals(AccessMode.rw) ? true: false;
-	}
 
 	
 }
diff --git a/src/main/java/com/github/dockerjava/api/model/Bind.java b/src/main/java/com/github/dockerjava/api/model/Bind.java
index 0071bff9..eb0b8fd4 100644
--- a/src/main/java/com/github/dockerjava/api/model/Bind.java
+++ b/src/main/java/com/github/dockerjava/api/model/Bind.java
@@ -53,11 +53,11 @@ public class Bind {
 			String[] parts = serialized.split(":");
 			switch (parts.length) {
 			case 2: {
-				return new Bind(parts[0], new Volume(parts[1]));
+				return new Bind(parts[0], Volume.parse(parts[1]));
 			}
 			case 3: {
 				AccessMode accessMode = AccessMode.valueOf(parts[2].toLowerCase());
-				return new Bind(parts[0], new Volume(parts[1]), accessMode);
+				return new Bind(parts[0], Volume.parse(parts[1]), accessMode);
 			}
 			default: {
 				throw new IllegalArgumentException();
@@ -96,7 +96,7 @@ public class Bind {
 	 */
 	@Override
 	public String toString() {
-		return path + ":" + volume.getPath() + ":" + accessMode.toString();
+		return path + ":" + volume.toString() + ":" + accessMode.toString();
 	}
 
 }
diff --git a/src/main/java/com/github/dockerjava/api/model/ContainerConfig.java b/src/main/java/com/github/dockerjava/api/model/ContainerConfig.java
index dcb1256b..b15d5ca8 100644
--- a/src/main/java/com/github/dockerjava/api/model/ContainerConfig.java
+++ b/src/main/java/com/github/dockerjava/api/model/ContainerConfig.java
@@ -51,9 +51,6 @@ public class ContainerConfig {
 	@JsonProperty("Image")
 	private String image;
 
-	@JsonProperty("MacAddress")
-	private String macAddress;
-	
 	@JsonProperty("Memory")
 	private long memoryLimit = 0;
 
@@ -127,10 +124,6 @@ public class ContainerConfig {
 	public boolean isStdInOnce() {
 		return stdInOnce;
 	}
-	
-	public String getMacAddress() {
-		return macAddress;
-	}
 
 	public long getMemoryLimit() {
 		return memoryLimit;
diff --git a/src/main/java/com/github/dockerjava/api/model/Event.java b/src/main/java/com/github/dockerjava/api/model/Event.java
index 674cb66d..cb961f97 100644
--- a/src/main/java/com/github/dockerjava/api/model/Event.java
+++ b/src/main/java/com/github/dockerjava/api/model/Event.java
@@ -14,18 +14,59 @@ public class Event {
 
     private long time;
 
+    /**
+     * Default constructor for the deserialization.
+     */
+    public Event() {
+    }
+
+    /**
+     * Constructor.
+     * @param id Container ID
+     * @param status Status string. 
+     *        List of statuses is available in <a href="https://docs.docker.com/reference/api/docker_remote_api_v1.16/#monitor-dockers-events">Docker API v.1.16</a>
+     * @param from Image, from which the container has been created
+     * @param time Event time
+     *      The time is specified in milliseconds since January 1, 1970, 00:00:00 GMT
+     * @since TODO
+     */
+    public Event(String status, String id, String from, long time) {
+        this.status = status;
+        this.id = id;
+        this.from = from;
+        this.time = time;
+    }
+    
+    /**
+     * Status of docker image or container. 
+     * List of statuses is available in <a href="https://docs.docker.com/reference/api/docker_remote_api_v1.16/#monitor-dockers-events">Docker API v.1.16</a>
+     * @return Status string
+     */
     public String getStatus() {
         return status;
     }
 
+    /**
+     * Get ID of docker container.
+     * @return Container ID
+     */
     public String getId() {
         return id;
     }
 
+    /**
+     * Get source image of the container.
+     * @return Name of the parent container
+     */
     public String getFrom() {
         return from;
     }
 
+    /**
+     * Get the event time.
+     * The time is specified in milliseconds since January 1, 1970, 00:00:00 GMT
+     * @return Event time in the specified format.
+     */
     public long getTime() {
         return time;
     }
diff --git a/src/main/java/com/github/dockerjava/api/model/Frame.java b/src/main/java/com/github/dockerjava/api/model/Frame.java
deleted file mode 100644
index 175b5683..00000000
--- a/src/main/java/com/github/dockerjava/api/model/Frame.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.github.dockerjava.api.model;
-
-import java.util.Arrays;
-
-/**
- * Represents a logging frame.
- */
-public class Frame {
-    private final StreamType streamType;
-    private final byte[] payload;
-
-    public Frame(StreamType streamType, byte[] payload) {
-        this.streamType = streamType;
-        this.payload = payload;
-    }
-
-    public StreamType getStreamType() {
-        return streamType;
-    }
-
-    public byte[] getPayload() {
-        return payload;
-    }
-
-    @Override
-    public String toString() {
-        return String.format("%s: %s", streamType, new String(payload).trim());
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        Frame frame = (Frame) o;
-
-        return streamType == frame.streamType && Arrays.equals(payload, frame.payload);
-
-    }
-
-    @Override
-    public int hashCode() {
-        int result = streamType.hashCode();
-        result = 31 * result + Arrays.hashCode(payload);
-        return result;
-    }
-}
diff --git a/src/main/java/com/github/dockerjava/api/model/Ports.java b/src/main/java/com/github/dockerjava/api/model/Ports.java
index 0c2df94a..d7c8a324 100644
--- a/src/main/java/com/github/dockerjava/api/model/Ports.java
+++ b/src/main/java/com/github/dockerjava/api/model/Ports.java
@@ -75,11 +75,7 @@ public class Ports {
             Binding[] bindings = ports.get(exposedPort);
             ports.put(exposedPort, (Binding[]) ArrayUtils.add(bindings, binding));
         } else {
-            if (binding == null) {
-                ports.put(exposedPort, null);
-            } else {
-                ports.put(exposedPort, new Binding[]{binding});
-            }
+            ports.put(exposedPort, new Binding[]{binding});
         }
     }
 
@@ -286,16 +282,12 @@ public class Ports {
 
                 Map.Entry<String, JsonNode> portNode = it.next();
                 JsonNode bindingsArray = portNode.getValue();
-                if (bindingsArray.equals(NullNode.getInstance())) {
-                    out.bind(ExposedPort.parse(portNode.getKey()), null);
-                } else {
-                    for (int i = 0; i < bindingsArray.size(); i++) {
-                        JsonNode bindingNode = bindingsArray.get(i);
-                        if (!bindingNode.equals(NullNode.getInstance())) {
-                            String hostIp = bindingNode.get("HostIp").textValue();
-                            int hostPort = bindingNode.get("HostPort").asInt();
-                            out.bind(ExposedPort.parse(portNode.getKey()), new Binding(hostIp, hostPort));
-                        }
+                for (int i = 0; i < bindingsArray.size(); i++) {
+                    JsonNode bindingNode = bindingsArray.get(i);
+                    if (!bindingNode.equals(NullNode.getInstance())) {
+                        String hostIp = bindingNode.get("HostIp").textValue();
+                        int hostPort = bindingNode.get("HostPort").asInt();
+                        out.bind(ExposedPort.parse(portNode.getKey()), new Binding(hostIp, hostPort));
                     }
                 }
             }
@@ -312,18 +304,14 @@ public class Ports {
             jsonGen.writeStartObject();
             for(Entry<ExposedPort, Binding[]> entry : portBindings.getBindings().entrySet()){
                 jsonGen.writeFieldName(entry.getKey().toString());
-                if (entry.getValue() != null) {
-                    jsonGen.writeStartArray();
-                    for (Binding binding : entry.getValue()) {
-                        jsonGen.writeStartObject();
-                        jsonGen.writeStringField("HostIp", binding.getHostIp() == null ? "" : binding.getHostIp());
-                        jsonGen.writeStringField("HostPort", binding.getHostPort() == null ? "" : binding.getHostPort().toString());
-                        jsonGen.writeEndObject();
-                    }
-                    jsonGen.writeEndArray();
-                } else {
-                    jsonGen.writeNull();
+                jsonGen.writeStartArray();
+                for (Binding binding : entry.getValue()) {
+                    jsonGen.writeStartObject();
+                    jsonGen.writeStringField("HostIp", binding.getHostIp() == null ? "" : binding.getHostIp());
+                    jsonGen.writeStringField("HostPort", binding.getHostPort() == null ? "" : binding.getHostPort().toString());
+                    jsonGen.writeEndObject();
                 }
+                jsonGen.writeEndArray();
             }
             jsonGen.writeEndObject();
         }
diff --git a/src/main/java/com/github/dockerjava/api/model/StreamType.java b/src/main/java/com/github/dockerjava/api/model/StreamType.java
deleted file mode 100644
index eb11c553..00000000
--- a/src/main/java/com/github/dockerjava/api/model/StreamType.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.github.dockerjava.api.model;
-
-public enum StreamType {
-    STDIN,
-    STDOUT,
-    STDERR
-}
diff --git a/src/main/java/com/github/dockerjava/api/model/Volume.java b/src/main/java/com/github/dockerjava/api/model/Volume.java
index 131a9a56..3ec5e24c 100644
--- a/src/main/java/com/github/dockerjava/api/model/Volume.java
+++ b/src/main/java/com/github/dockerjava/api/model/Volume.java
@@ -24,18 +24,42 @@ import com.fasterxml.jackson.databind.node.NullNode;
  * 
  * @see Bind
  */
+@JsonDeserialize(using = Volume.Deserializer.class)
+@JsonSerialize(using = Volume.Serializer.class)
 public class Volume {
 
 	private String path;
 	
+	private AccessMode accessMode = AccessMode.rw;
+
 	public Volume(String path) {
 		this.path = path;
 	}
+	
+	public Volume(String path, AccessMode accessMode) {
+		this.path = path;
+		this.accessMode = accessMode;
+	}
 
 	public String getPath() {
 		return path;
 	}
+	
+	public AccessMode getAccessMode() {
+		return accessMode;
+	}
 
+	public static Volume parse(String serialized) {
+		return new Volume(serialized);
+	}
+	
+	/**
+	 * Returns a string representation of this {@link Volume} suitable
+	 * for inclusion in a JSON message.
+	 * The returned String is simply the container path, {@link #getPath()}. 
+	 * 
+	 * @return a string representation of this {@link Volume}
+	 */
 	@Override
 	public String toString() {
 		return getPath();
@@ -45,14 +69,48 @@ public class Volume {
 	public boolean equals(Object obj) {
 		if (obj instanceof Volume) {
 			Volume other = (Volume) obj;
-			return new EqualsBuilder().append(path, other.getPath()).isEquals();
+			return new EqualsBuilder().append(path, other.getPath()).append(accessMode, other.getAccessMode())
+					.isEquals();
 		} else
 			return super.equals(obj);
 	}
 
 	@Override
 	public int hashCode() {
-		return new HashCodeBuilder().append(path).toHashCode();
+		return new HashCodeBuilder().append(path).append(accessMode).toHashCode();
 	}
+	
+	public static class Serializer extends JsonSerializer<Volume> {
+
+		@Override
+		public void serialize(Volume volume, JsonGenerator jsonGen,
+				SerializerProvider serProvider) throws IOException,
+				JsonProcessingException {
+
+			jsonGen.writeStartObject();
+			jsonGen.writeFieldName(volume.getPath());
+			jsonGen.writeString(Boolean.toString(volume.getAccessMode().equals(AccessMode.rw) ? true: false));
+			jsonGen.writeEndObject();
+		}
+
+	}
+
+	public static class Deserializer extends JsonDeserializer<Volume> {
+		@Override
+		public Volume deserialize(JsonParser jsonParser,
+				DeserializationContext deserializationContext)
+				throws IOException, JsonProcessingException {
+			ObjectCodec oc = jsonParser.getCodec();
+			JsonNode node = oc.readTree(jsonParser);
+			if (!node.equals(NullNode.getInstance())) {
+				Entry<String, JsonNode> field = node.fields().next();
+				return Volume.parse(field.getKey());
+			} else {
+				return null;
+			}
+		}
+	}
+
+	
 
 }
diff --git a/src/main/java/com/github/dockerjava/api/model/VolumeRW.java b/src/main/java/com/github/dockerjava/api/model/VolumeRW.java
deleted file mode 100644
index 717385d9..00000000
--- a/src/main/java/com/github/dockerjava/api/model/VolumeRW.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package com.github.dockerjava.api.model;
-
-import java.io.IOException;
-import java.util.Map.Entry;
-
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.ObjectCodec;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.node.NullNode;
-
-/**
- * Represents a bind mounted volume in a Docker container.
- * 
- * @see Bind
- */
-@JsonDeserialize(using = VolumeRW.Deserializer.class)
-@JsonSerialize(using = VolumeRW.Serializer.class)
-public class VolumeRW {
-
-	private Volume volume;
-	
-	private AccessMode accessMode = AccessMode.rw;
-
-	public VolumeRW(Volume volume) {
-		this.volume = volume;
-	}
-	
-	public VolumeRW(Volume volume, AccessMode accessMode) {
-		this.volume = volume;
-		this.accessMode = accessMode;
-	}
-
-	public Volume getVolume() {
-		return volume;
-	}
-	
-	public AccessMode getAccessMode() {
-		return accessMode;
-	}
-
-	
-	/**
-	 * Returns a string representation of this {@link VolumeRW} suitable
-	 * for inclusion in a JSON message.
-	 * The returned String is simply the container path, {@link #getPath()}. 
-	 * 
-	 * @return a string representation of this {@link VolumeRW}
-	 */
-	@Override
-	public String toString() {
-		return getVolume() + ":" + getAccessMode();
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (obj instanceof VolumeRW) {
-			VolumeRW other = (VolumeRW) obj;
-			return new EqualsBuilder().append(getVolume(), other.getVolume()).append(accessMode, other.getAccessMode())
-					.isEquals();
-		} else
-			return super.equals(obj);
-	}
-
-	@Override
-	public int hashCode() {
-		return new HashCodeBuilder().append(getVolume()).append(getAccessMode()).toHashCode();
-	}
-	
-	public static class Serializer extends JsonSerializer<VolumeRW> {
-
-		@Override
-		public void serialize(VolumeRW volumeRW, JsonGenerator jsonGen,
-				SerializerProvider serProvider) throws IOException,
-				JsonProcessingException {
-
-			jsonGen.writeStartObject();
-			jsonGen.writeFieldName(volumeRW.getVolume().getPath());
-			jsonGen.writeString(Boolean.toString(volumeRW.getAccessMode().toBoolean()));
-			jsonGen.writeEndObject();
-		}
-
-	}
-
-	public static class Deserializer extends JsonDeserializer<VolumeRW> {
-		@Override
-		public VolumeRW deserialize(JsonParser jsonParser,
-				DeserializationContext deserializationContext)
-				throws IOException, JsonProcessingException {
-			ObjectCodec oc = jsonParser.getCodec();
-			JsonNode node = oc.readTree(jsonParser);
-			if (!node.equals(NullNode.getInstance())) {
-				Entry<String, JsonNode> field = node.fields().next();
-				String volume = field.getKey();
-				AccessMode accessMode = AccessMode.fromBoolean(field.getValue().asBoolean());
-				return new VolumeRW(new Volume(volume), accessMode);
-			} else {
-				return null;
-			}
-		}
-	}
-
-	
-
-}
diff --git a/src/main/java/com/github/dockerjava/api/model/Volumes.java b/src/main/java/com/github/dockerjava/api/model/Volumes.java
index b85536e1..69753d6a 100644
--- a/src/main/java/com/github/dockerjava/api/model/Volumes.java
+++ b/src/main/java/com/github/dockerjava/api/model/Volumes.java
@@ -48,9 +48,7 @@ public class Volumes {
 			jsonGen.writeStartObject();
 			for (Volume volume : volumes.getVolumes()) {
 				jsonGen.writeFieldName(volume.getPath());
-				jsonGen.writeStartObject();
-				jsonGen.writeEndObject();
-				//jsonGen.writeString(Boolean.toString(volume.getAccessMode().equals(AccessMode.rw) ? true: false));
+				jsonGen.writeString(Boolean.toString(volume.getAccessMode().equals(AccessMode.rw) ? true: false));
 			}
 			jsonGen.writeEndObject();
 		}
@@ -68,8 +66,7 @@ public class Volumes {
 
                 Map.Entry<String, JsonNode> field = it.next();
                 if (!field.getValue().equals(NullNode.getInstance())) {
-                	String path = field.getKey();
-                	Volume volume = new Volume(path);
+                	Volume volume = Volume.parse(field.getKey());
                 	volumes.add(volume);
                 }
             }
diff --git a/src/main/java/com/github/dockerjava/api/model/VolumesRW.java b/src/main/java/com/github/dockerjava/api/model/VolumesRW.java
deleted file mode 100644
index 223f518c..00000000
--- a/src/main/java/com/github/dockerjava/api/model/VolumesRW.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.github.dockerjava.api.model;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.ObjectCodec;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.node.NullNode;
-
-// This is not going to be serialized
-@JsonDeserialize(using = VolumesRW.Deserializer.class)
-public class VolumesRW {
-    private final VolumeRW[] volumesRW;
-
-    public VolumesRW(VolumeRW... binds) {
-        this.volumesRW = binds;
-    }
-
-    public VolumeRW[] getVolumesRW() {
-        return volumesRW;
-    }
-
-    public static final class Deserializer extends JsonDeserializer<VolumesRW> {
-        @Override
-        public VolumesRW deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
-
-            List<VolumeRW> volumesRW = new ArrayList<VolumeRW>();
-            ObjectCodec oc = jsonParser.getCodec();
-            JsonNode node = oc.readTree(jsonParser);
-            
-            
-            for (Iterator<Map.Entry<String, JsonNode>> it = node.fields(); it.hasNext();) {
-                Map.Entry<String, JsonNode> field = it.next();
-                JsonNode value = field.getValue();
-                
-                if (!value.equals(NullNode.getInstance())) {
-                    if (!value.isBoolean()){
-                        throw deserializationContext.mappingException("Expected access mode for '"+field.getKey()+"' in host but got '"+ value+"'.");
-                    }
-                    
-                    VolumeRW bind = new VolumeRW(new Volume(field.getKey()), AccessMode.fromBoolean(value.asBoolean()));
-                    volumesRW.add(bind);
-                }
-            }
-            return new VolumesRW(volumesRW.toArray(new VolumeRW[volumesRW.size()]));
-        }
-    }
-
-}
diff --git a/src/main/java/com/github/dockerjava/core/AuthConfigFile.java b/src/main/java/com/github/dockerjava/core/AuthConfigFile.java
index 862259a8..24c7aa5c 100644
--- a/src/main/java/com/github/dockerjava/core/AuthConfigFile.java
+++ b/src/main/java/com/github/dockerjava/core/AuthConfigFile.java
@@ -7,7 +7,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import com.github.dockerjava.api.model.AuthConfigurations;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
@@ -51,15 +50,6 @@ public class AuthConfigFile {
         return null;
     }
 
-    public AuthConfigurations getAuthConfigurations() {
-        final AuthConfigurations authConfigurations = new AuthConfigurations();
-        for(Map.Entry<String, AuthConfig> authConfigEntry : authConfigMap.entrySet()) {
-            authConfigurations.addConfig(authConfigEntry.getValue());
-        }
-
-        return authConfigurations;
-    }
-
     @Override
     public int hashCode() {
         final int prime = 31;
diff --git a/src/main/java/com/github/dockerjava/core/DockerClientBuilder.java b/src/main/java/com/github/dockerjava/core/DockerClientBuilder.java
index 4aa7d5ac..155b36be 100644
--- a/src/main/java/com/github/dockerjava/core/DockerClientBuilder.java
+++ b/src/main/java/com/github/dockerjava/core/DockerClientBuilder.java
@@ -36,9 +36,6 @@ public class DockerClientBuilder {
 	}
 
 	public static DockerCmdExecFactory getDefaultDockerCmdExecFactory() {
-		// clearing the cache is needed because otherwise we will get
-		// the same DockerCmdExecFactory instance each time
-		serviceLoader.reload();
 		if(!serviceLoader.iterator().hasNext()) {
 			throw new RuntimeException("Fatal: Can't find any implementation of '" + DockerCmdExecFactory.class.getName() +  "' in the current classpath.");
 		}
diff --git a/src/main/java/com/github/dockerjava/core/DockerClientConfig.java b/src/main/java/com/github/dockerjava/core/DockerClientConfig.java
index 7e0b57b0..05491ec6 100644
--- a/src/main/java/com/github/dockerjava/core/DockerClientConfig.java
+++ b/src/main/java/com/github/dockerjava/core/DockerClientConfig.java
@@ -14,7 +14,6 @@ import java.util.Properties;
 
 import com.github.dockerjava.api.DockerClientException;
 import com.github.dockerjava.api.model.AuthConfig;
-import com.github.dockerjava.api.model.AuthConfigurations;
 import com.github.dockerjava.core.NameParser.HostnameReposName;
 import com.github.dockerjava.core.NameParser.ReposTag;
 
@@ -311,24 +310,6 @@ public class DockerClientConfig implements Serializable {
 		return authConfig;
 	}
 
-    public AuthConfigurations getAuthConfigurations() {
-        String dockerCfgFile = getDockerCfgPath();
-        if (dockerCfgFile != null) {
-            AuthConfigFile authConfigFile;
-            try {
-                authConfigFile = AuthConfigFile.loadConfig(new File(
-                        dockerCfgFile));
-            } catch (IOException e) {
-                throw new DockerClientException(
-                        "Failed to parse dockerCfgFile", e);
-            }
-
-            return authConfigFile.getAuthConfigurations();
-        }
-
-        return new AuthConfigurations();
-    }
-
   @Override
     public boolean equals(Object o) {
         if (this == o) return true;
diff --git a/src/main/java/com/github/dockerjava/core/DockerClientImpl.java b/src/main/java/com/github/dockerjava/core/DockerClientImpl.java
index 7e96225f..534c58eb 100644
--- a/src/main/java/com/github/dockerjava/core/DockerClientImpl.java
+++ b/src/main/java/com/github/dockerjava/core/DockerClientImpl.java
@@ -10,13 +10,12 @@ import java.io.InputStream;
 import com.github.dockerjava.api.DockerClient;
 import com.github.dockerjava.api.command.*;
 import com.github.dockerjava.api.model.AuthConfig;
-import com.github.dockerjava.api.model.AuthConfigurations;
 import com.github.dockerjava.api.model.Identifier;
 import com.github.dockerjava.core.command.*;
 
 /**
  * @author Konstantin Pelykh (kpelykh@gmail.com)
- *
+ * 
  * @see "https://github.com/docker/docker/blob/master/api/client/commands.go"
  */
 public class DockerClientImpl implements Closeable, DockerClient {
@@ -292,29 +291,20 @@ public class DockerClientImpl implements Closeable, DockerClient {
 
     @Override
     public BuildImageCmd buildImageCmd() {
-        return augmentBuildImageCmd(new BuildImageCmdImpl(getDockerCmdExecFactory()
-                .createBuildImageCmdExec()));
+        return new BuildImageCmdImpl(getDockerCmdExecFactory()
+                .createBuildImageCmdExec());
     }
 
 	@Override
 	public BuildImageCmd buildImageCmd(File dockerFileOrFolder) {
-		return augmentBuildImageCmd(new BuildImageCmdImpl(getDockerCmdExecFactory()
-				.createBuildImageCmdExec(), dockerFileOrFolder));
+		return new BuildImageCmdImpl(getDockerCmdExecFactory()
+				.createBuildImageCmdExec(), dockerFileOrFolder);
 	}
 
-    @Override
-    public BuildImageCmd buildImageCmd(InputStream tarInputStream) {
-        return augmentBuildImageCmd(new BuildImageCmdImpl(getDockerCmdExecFactory()
-				.createBuildImageCmdExec(), tarInputStream));
-    }
-
-	private BuildImageCmd augmentBuildImageCmd(BuildImageCmd buildImageCmd) {
-		final AuthConfigurations authConfigurations = dockerClientConfig.getAuthConfigurations();
-		if (!authConfigurations.getConfigs().isEmpty()) {
-			buildImageCmd.withBuildAuthConfigs(authConfigurations);
-		}
-
-		return buildImageCmd;
+	@Override
+	public BuildImageCmd buildImageCmd(InputStream tarInputStream) {
+		return new BuildImageCmdImpl(getDockerCmdExecFactory()
+				.createBuildImageCmdExec(), tarInputStream);
 	}
 
 	@Override
diff --git a/src/main/java/com/github/dockerjava/core/command/CreateContainerCmdImpl.java b/src/main/java/com/github/dockerjava/core/command/CreateContainerCmdImpl.java
index 18b089d4..5afd0dbb 100644
--- a/src/main/java/com/github/dockerjava/core/command/CreateContainerCmdImpl.java
+++ b/src/main/java/com/github/dockerjava/core/command/CreateContainerCmdImpl.java
@@ -74,10 +74,8 @@ public class CreateContainerCmdImpl extends
 	private Volumes volumes = new Volumes();
 	@JsonProperty("WorkingDir")
 	private String workingDir = "";
-	@JsonProperty("MacAddress")
-	private String macAddress;
-	@JsonProperty("NetworkDisabled")
-	private boolean networkDisabled = false;
+	@JsonProperty("DisableNetwork")
+	private boolean disableNetwork = false;
 	@JsonProperty("ExposedPorts")
 	private ExposedPorts exposedPorts = new ExposedPorts();
 	@JsonProperty("HostConfig")
@@ -198,10 +196,6 @@ public class CreateContainerCmdImpl extends
 	public LxcConf[] getLxcConf() {
 		return hostConfig.getLxcConf();
 	}
-	
-	public String getMacAddress() {
-		return macAddress;
-	}
 
 	@Override
 	public long getMemoryLimit() {
@@ -279,8 +273,8 @@ public class CreateContainerCmdImpl extends
 	}
 
 	@Override
-	public boolean isNetworkDisabled() {
-		return networkDisabled;
+	public boolean isDisableNetwork() {
+		return disableNetwork;
 	}
 
 	@Override
@@ -378,8 +372,8 @@ public class CreateContainerCmdImpl extends
 	}
 
 	@Override
-	public CreateContainerCmdImpl withNetworkDisabled(boolean disableNetwork) {
-		this.networkDisabled = disableNetwork;
+	public CreateContainerCmdImpl withDisableNetwork(boolean disableNetwork) {
+		this.disableNetwork = disableNetwork;
 		return this;
 	}
 
@@ -451,12 +445,6 @@ public class CreateContainerCmdImpl extends
 		this.hostConfig.setLxcConf(lxcConf);
 		return this;
 	}
-	
-	@Override
-	public CreateContainerCmdImpl withMacAddress(String macAddress) {
-		this.macAddress = macAddress;
-		return this;
-	}
 
 	@Override
 	public CreateContainerCmdImpl withMemoryLimit(long memoryLimit) {
diff --git a/src/main/java/com/github/dockerjava/core/command/FrameReader.java b/src/main/java/com/github/dockerjava/core/command/FrameReader.java
deleted file mode 100644
index c3979146..00000000
--- a/src/main/java/com/github/dockerjava/core/command/FrameReader.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.github.dockerjava.core.command;
-
-import com.github.dockerjava.api.model.Frame;
-import com.github.dockerjava.api.model.StreamType;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Breaks the input into frame. Similar to how a buffered reader would readLies.
- * <p/>
- * See:  {@link }http://docs.docker.com/v1.6/reference/api/docker_remote_api_v1.13/#attach-to-a-container}
- */
-public class FrameReader implements AutoCloseable {
-
-    private static final int HEADER_SIZE = 8;
-    private final InputStream inputStream;
-
-    public FrameReader(InputStream inputStream) {
-        this.inputStream = inputStream;
-    }
-
-    private static StreamType streamType(byte streamType) {
-        switch (streamType) {
-            case 0:
-                return StreamType.STDIN;
-            case 1:
-                return StreamType.STDOUT;
-            case 2:
-                return StreamType.STDERR;
-            default:
-                throw new IllegalArgumentException("invalid streamType");
-        }
-    }
-
-    /**
-     * @return A frame, or null if no more frames.
-     */
-    public Frame readFrame() throws IOException {
-        byte[] header = new byte[HEADER_SIZE];
-        int headerSize = inputStream.read(header);
-
-        if (headerSize == -1) {
-            return null;
-        }
-
-        if (headerSize != HEADER_SIZE) {
-            throw new IOException(String.format("header must be %d bytes long, but was %d", HEADER_SIZE, headerSize));
-        }
-
-        int payloadSize = ((header[4] & 0xff) << 24) + ((header[5] & 0xff) << 16) + ((header[6] & 0xff) << 8) + (header[7] & 0xff);
-
-        byte[] payload = new byte[payloadSize];
-        int actualPayloadSize = inputStream.read(payload);
-        if (actualPayloadSize != payloadSize) {
-            throw new IOException(String.format("payload must be %d bytes long, but was %d", payloadSize, actualPayloadSize));
-        }
-
-        return new Frame(streamType(header[0]), payload);
-    }
-
-    @Override
-    public void close() throws IOException {
-        inputStream.close();
-    }
-}
diff --git a/src/main/java/com/github/dockerjava/jaxrs/BuildImageCmdExec.java b/src/main/java/com/github/dockerjava/jaxrs/BuildImageCmdExec.java
index 3bdfb006..b5ea85ed 100644
--- a/src/main/java/com/github/dockerjava/jaxrs/BuildImageCmdExec.java
+++ b/src/main/java/com/github/dockerjava/jaxrs/BuildImageCmdExec.java
@@ -1,5 +1,21 @@
 package com.github.dockerjava.jaxrs;
 
+import static javax.ws.rs.client.Entity.entity;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.client.RequestEntityProcessing;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectReader;
 import com.github.dockerjava.api.command.BuildImageCmd;
@@ -7,20 +23,6 @@ import com.github.dockerjava.api.model.AuthConfigurations;
 import com.github.dockerjava.api.model.EventStreamItem;
 import com.github.dockerjava.jaxrs.util.WrappedResponseInputStream;
 import com.google.common.collect.ImmutableList;
-import org.glassfish.jersey.client.ClientProperties;
-import org.glassfish.jersey.client.RequestEntityProcessing;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-
-import static javax.ws.rs.client.Entity.entity;
 
 public class BuildImageCmdExec extends
 		AbstrDockerCmdExec<BuildImageCmd, BuildImageCmd.Response> implements
@@ -110,11 +112,5 @@ public class BuildImageCmdExec extends
 		public int read() throws IOException {
 			return proxy.read();
 		}
-
-		@Override
-		public void close() throws IOException {
-			proxy.close();
-			super.close();
-		}
 	}
 }


Test patch:
diff --git a/src/test/java/com/github/dockerjava/api/model/Ports_SerializingTest.java b/src/test/java/com/github/dockerjava/api/model/Ports_SerializingTest.java
index 9190eefd..25931069 100644
--- a/src/test/java/com/github/dockerjava/api/model/Ports_SerializingTest.java
+++ b/src/test/java/com/github/dockerjava/api/model/Ports_SerializingTest.java
@@ -13,7 +13,6 @@ public class Ports_SerializingTest {
 	private final ObjectMapper objectMapper = new ObjectMapper();
 	private final String jsonWithDoubleBindingForOnePort = 
 			"{\"80/tcp\":[{\"HostIp\":\"10.0.0.1\",\"HostPort\":\"80\"},{\"HostIp\":\"10.0.0.2\",\"HostPort\":\"80\"}]}";
-	private final String jsonWithNullBindingForOnePort = "{\"80/tcp\":null}";
 
 	@Test
 	public void deserializingPortWithMultipleBindings() throws Exception {
@@ -40,20 +39,4 @@ public class Ports_SerializingTest {
 		Ports ports = new Ports(ExposedPort.tcp(80), new Binding(null, null));
 		assertEquals(objectMapper.writeValueAsString(ports), "{\"80/tcp\":[{\"HostIp\":\"\",\"HostPort\":\"\"}]}");
 	}
-
-	@Test
-	public void deserializingPortWithNullBindings() throws Exception {
-		Ports ports = objectMapper.readValue(jsonWithNullBindingForOnePort, Ports.class);
-		Map<ExposedPort, Binding[]> map = ports.getBindings();
-		assertEquals(map.size(), 1);
-
-		assertEquals(map.get(ExposedPort.tcp(80)), null);
-	}
-
-	@Test
-	public void serializingWithNullBindings() throws Exception {
-		Ports ports = new Ports();
-		ports.bind(ExposedPort.tcp(80), null);
-		assertEquals(objectMapper.writeValueAsString(ports), jsonWithNullBindingForOnePort);
-	}
 }
diff --git a/src/test/java/com/github/dockerjava/api/model/Ports_addBindingsTest.java b/src/test/java/com/github/dockerjava/api/model/Ports_addBindingsTest.java
index 18c7f0f0..20e47df9 100644
--- a/src/test/java/com/github/dockerjava/api/model/Ports_addBindingsTest.java
+++ b/src/test/java/com/github/dockerjava/api/model/Ports_addBindingsTest.java
@@ -1,7 +1,6 @@
 package com.github.dockerjava.api.model;
 
 import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
 
 import java.util.Map;
 
@@ -55,12 +54,4 @@ public class Ports_addBindingsTest {
 		assertEquals(bindings.get(TCP_80), new Binding[] { BINDING_8080, BINDING_9090 });
 	}
 
-	@Test
-	public void addNullBindings() {
-		ports.add(new PortBinding(null, TCP_80));
-		Map<ExposedPort, Binding[]> bindings = ports.getBindings();
-		// one key with two values
-		assertEquals(bindings.size(), 1);
-		assertEquals(bindings.get(TCP_80), null);
-	}
 }
diff --git a/src/test/java/com/github/dockerjava/api/model/VolumeTest.java b/src/test/java/com/github/dockerjava/api/model/VolumeTest.java
index 7419e5dc..8fdf1997 100644
--- a/src/test/java/com/github/dockerjava/api/model/VolumeTest.java
+++ b/src/test/java/com/github/dockerjava/api/model/VolumeTest.java
@@ -6,7 +6,7 @@ import org.testng.annotations.Test;
 
 public class VolumeTest {
 	@Test
-	public void getPath() {
-		assertEquals(new Volume("/path").getPath(), "/path");
+	public void stringify() {
+		assertEquals(Volume.parse("/path").toString(), "/path");
 	}
 }
diff --git a/src/test/java/com/github/dockerjava/core/command/CreateContainerCmdImplTest.java b/src/test/java/com/github/dockerjava/core/command/CreateContainerCmdImplTest.java
index 4feadc6b..f652c570 100644
--- a/src/test/java/com/github/dockerjava/core/command/CreateContainerCmdImplTest.java
+++ b/src/test/java/com/github/dockerjava/core/command/CreateContainerCmdImplTest.java
@@ -30,7 +30,6 @@ import com.github.dockerjava.api.ConflictException;
 import com.github.dockerjava.api.DockerException;
 import com.github.dockerjava.api.command.CreateContainerResponse;
 import com.github.dockerjava.api.command.InspectContainerResponse;
-import com.github.dockerjava.api.model.AccessMode;
 import com.github.dockerjava.api.model.Bind;
 import com.github.dockerjava.api.model.Device;
 import com.github.dockerjava.api.model.ExposedPort;
@@ -39,8 +38,6 @@ import com.github.dockerjava.api.model.Link;
 import com.github.dockerjava.api.model.Ports;
 import com.github.dockerjava.api.model.RestartPolicy;
 import com.github.dockerjava.api.model.Volume;
-import com.github.dockerjava.api.model.VolumeRW;
-import com.github.dockerjava.api.model.Volumes;
 import com.github.dockerjava.api.model.VolumesFrom;
 import com.github.dockerjava.client.AbstractDockerClientTest;
 
@@ -91,11 +88,9 @@ public class CreateContainerCmdImplTest extends AbstractDockerClientTest {
 	@Test
 	public void createContainerWithVolume() throws DockerException {
 
-		Volume volume = new Volume("/var/log");
-		
 		CreateContainerResponse container = dockerClient
 				.createContainerCmd("busybox")
-				.withVolumes(volume).withCmd("true").exec();
+				.withVolumes(new Volume("/var/log")).withCmd("true").exec();
 
 		LOG.info("Created container {}", container.toString());
 
@@ -109,37 +104,6 @@ public class CreateContainerCmdImplTest extends AbstractDockerClientTest {
 
 		assertThat(inspectContainerResponse.getConfig().getVolumes().keySet(),
 				contains("/var/log"));
-		
-		assertThat(inspectContainerResponse.getVolumesRW(),
-				hasItemInArray(new VolumeRW(volume, AccessMode.rw)));
-	}
-	
-	@Test
-	public void createContainerWithReadOnlyVolume() throws DockerException {
-
-		Volume volume = new Volume("/srv/test");
-		
-		CreateContainerResponse container = dockerClient
-				.createContainerCmd("busybox")
-				.withVolumes(volume)
-				.withCmd("true")
-				.exec();
-
-		LOG.info("Created container {}", container.toString());
-
-		assertThat(container.getId(), not(isEmptyString()));
-
-		InspectContainerResponse inspectContainerResponse = dockerClient
-				.inspectContainerCmd(container.getId()).exec();
-
-		LOG.info("Inspect container {}", inspectContainerResponse.getConfig()
-				.getVolumes());
-
-		assertThat(inspectContainerResponse.getConfig().getVolumes().keySet(),
-				contains("/srv/test"));
-		
-		assertThat(Arrays.asList(inspectContainerResponse.getVolumesRW()),
-				contains(new VolumeRW(volume)));
 	}
 	
 	@Test
@@ -208,7 +172,8 @@ public class CreateContainerCmdImplTest extends AbstractDockerClientTest {
 
 		assertThat(
 				Arrays.asList(inspectContainerResponse.getConfig().getEnv()),
-				containsInAnyOrder("VARIABLE=success"));
+				containsInAnyOrder("VARIABLE=success",
+						"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"));
 
 		dockerClient.startContainerCmd(container.getId()).exec();
 
@@ -545,24 +510,4 @@ public class CreateContainerCmdImplTest extends AbstractDockerClientTest {
 				is(equalTo("host")));
 	}
 	
-	@Test
-	public void createContainerWithMacAddress() throws DockerException {
-
-		CreateContainerResponse container = dockerClient
-				.createContainerCmd("busybox")
-				.withMacAddress("00:80:41:ae:fd:7e")
-				.withCmd("true")
-				.exec();
-
-		LOG.info("Created container {}", container.toString());
-
-		assertThat(container.getId(), not(isEmptyString()));
-
-		InspectContainerResponse inspectContainerResponse = dockerClient
-				.inspectContainerCmd(container.getId()).exec();
-
-		assertEquals(inspectContainerResponse.getConfig().getMacAddress(),
-				"00:80:41:ae:fd:7e");
-	}
-	
 }
diff --git a/src/test/java/com/github/dockerjava/core/command/DockerfileFixture.java b/src/test/java/com/github/dockerjava/core/command/DockerfileFixture.java
deleted file mode 100644
index 2d7ca7c8..00000000
--- a/src/test/java/com/github/dockerjava/core/command/DockerfileFixture.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package com.github.dockerjava.core.command;
-
-import com.github.dockerjava.api.DockerClient;
-import com.github.dockerjava.api.InternalServerErrorException;
-import com.github.dockerjava.api.NotFoundException;
-import com.github.dockerjava.api.model.Image;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-
-/**
- * Start and stop a single container for testing.
- */
-public class DockerfileFixture implements AutoCloseable {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(DockerfileFixture.class);
-    private final DockerClient dockerClient;
-    private String directory;
-    private String repository;
-    private String containerId;
-
-    public DockerfileFixture(DockerClient dockerClient, String directory) {
-        this.dockerClient = dockerClient;
-        this.directory = directory;
-    }
-
-    public void open() throws Exception {
-
-        LOGGER.info("building {}", directory);
-        dockerClient
-                .buildImageCmd(new File("src/test/resources", directory))
-                .withNoCache() // remove alternatives, cause problems
-                .exec()
-                .close();
-
-        Image lastCreatedImage = dockerClient
-                .listImagesCmd()
-                .exec()
-                .get(0);
-
-        repository = lastCreatedImage
-                .getRepoTags()[0];
-
-        LOGGER.info("created {} {}", lastCreatedImage.getId(), repository);
-
-        containerId = dockerClient
-                .createContainerCmd(lastCreatedImage.getId())
-                .exec()
-                .getId();
-
-        LOGGER.info("starting {}", containerId);
-
-        dockerClient
-                .startContainerCmd(containerId)
-                .exec();
-    }
-
-    @Override
-    public void close() throws Exception {
-
-        if (containerId != null) {
-            LOGGER.info("removing container {}", containerId);
-            try {
-                dockerClient
-                        .removeContainerCmd(containerId)
-                        .withForce() // stop too
-                        .exec();
-            } catch (NotFoundException | InternalServerErrorException ignored) {
-                LOGGER.info("ignoring {}", ignored.getMessage());
-            }
-            containerId = null;
-        }
-
-        if (repository != null) {
-            LOGGER.info("removing repository {}", repository);
-            try {
-                dockerClient
-                        .removeImageCmd(repository)
-                        .withForce()
-                        .exec();
-            } catch (InternalServerErrorException e) {
-                LOGGER.info("ignoring {}", e.getMessage());
-            }
-            repository = null;
-        }
-    }
-
-    public String getContainerId() {
-        return containerId;
-    }
-}
diff --git a/src/test/java/com/github/dockerjava/core/command/FrameReaderITest.java b/src/test/java/com/github/dockerjava/core/command/FrameReaderITest.java
deleted file mode 100644
index 4654d83d..00000000
--- a/src/test/java/com/github/dockerjava/core/command/FrameReaderITest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.github.dockerjava.core.command;
-
-
-import com.github.dockerjava.api.model.Frame;
-import com.github.dockerjava.api.model.StreamType;
-import com.github.dockerjava.client.AbstractDockerClientTest;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-@Test(groups = "integration")
-public class FrameReaderITest extends AbstractDockerClientTest {
-
-    private DockerfileFixture dockerfileFixture;
-
-    @BeforeTest
-    @Override
-    public void beforeTest() {
-        super.beforeTest();
-        dockerfileFixture = new DockerfileFixture(dockerClient, "frameReaderDockerfile");
-    }
-
-    @BeforeMethod
-    public void createAndStartDockerContainer() throws Exception {
-        dockerfileFixture.open();
-    }
-
-    @AfterMethod
-    public void deleteDockerContainerImage() throws Exception {
-        dockerfileFixture.close();
-    }
-
-    @AfterTest
-    @Override
-    public void afterTest() {
-        super.afterTest();
-    }
-
-    @Test
-    public void canCloseFrameReaderAndReadExpectedLines() throws Exception {
-
-        try (FrameReader reader = new FrameReader(getLoggerStream())) {
-            assertEquals(reader.readFrame(), new Frame(StreamType.STDOUT, String.format("to stdout%n").getBytes()));
-            assertEquals(reader.readFrame(), new Frame(StreamType.STDERR, String.format("to stderr%n").getBytes()));
-            assertNull(reader.readFrame());
-        }
-    }
-
-    private InputStream getLoggerStream() {
-        return dockerClient
-                .logContainerCmd(dockerfileFixture.getContainerId())
-                .withStdOut()
-                .withStdErr()
-                .withTailAll()
-                .withTail(10)
-                .withFollowStream()
-                .exec();
-    }
-
-    @Test
-    public void canLogInOneThreadAndExecuteCommandsInAnother() throws Exception {
-
-        Thread thread = new Thread(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    try (FrameReader reader = new FrameReader(getLoggerStream())) {
-                        //noinspection StatementWithEmptyBody
-                        while (reader.readFrame() != null) {
-                            // nop
-                        }
-                    }
-                } catch (IOException e) {
-                    throw new RuntimeException(e);
-                }
-            }
-        });
-
-        thread.start();
-
-        try (DockerfileFixture busyboxDockerfile = new DockerfileFixture(dockerClient, "busyboxDockerfile")) {
-            busyboxDockerfile.open();
-        }
-
-        thread.join();
-
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/com/github/dockerjava/core/command/FrameReaderTest.java b/src/test/java/com/github/dockerjava/core/command/FrameReaderTest.java
deleted file mode 100644
index 2b5e2b64..00000000
--- a/src/test/java/com/github/dockerjava/core/command/FrameReaderTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.github.dockerjava.core.command;
-
-import com.github.dockerjava.api.model.Frame;
-import com.github.dockerjava.api.model.StreamType;
-import org.testng.annotations.Test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-
-public class FrameReaderTest {
-    public static final int HEADER_SIZE = 8;
-    private final List<Integer> bytes = new ArrayList<>();
-    private final InputStream inputStream = new InputStream() {
-        @Override
-        public int read() throws IOException {
-            return bytes.isEmpty() ? -1 : bytes.remove(0);
-        }
-    };
-    private final FrameReader frameReader = new FrameReader(inputStream);
-
-    @Test
-    public void endOfStreamReturnsNull() throws Exception {
-        assertNull(nextFrame());
-    }
-
-    @Test
-    public void stdInBytesFrameReturnsFrame() throws Exception {
-        assertEquals(nextFrame(0, 0, 0, 0, 0, 0, 0, 0), new Frame(StreamType.STDIN, new byte[0]));
-    }
-
-    private Frame nextFrame(int... bytes) throws IOException {
-        setBytes(bytes);
-        return frameReader.readFrame();
-    }
-
-    @Test
-    public void stdOutBytesFrameReturnsFrame() throws Exception {
-        assertEquals(nextFrame(1, 0, 0, 0, 0, 0, 0, 0), new Frame(StreamType.STDOUT, new byte[0]));
-    }
-
-    @Test
-    public void stdErrBytesFrameReturnsFrame() throws Exception {
-        assertEquals(nextFrame(2, 0, 0, 0, 0, 0, 0, 0), new Frame(StreamType.STDERR, new byte[0]));
-    }
-
-    private void setBytes(int... bytes) {
-        this.bytes.clear();
-        for (int aByte : bytes) {
-            this.bytes.add(aByte);
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/com/github/dockerjava/core/command/StartContainerCmdImplTest.java b/src/test/java/com/github/dockerjava/core/command/StartContainerCmdImplTest.java
index 9a307165..f7cbe20c 100644
--- a/src/test/java/com/github/dockerjava/core/command/StartContainerCmdImplTest.java
+++ b/src/test/java/com/github/dockerjava/core/command/StartContainerCmdImplTest.java
@@ -65,8 +65,7 @@ public class StartContainerCmdImplTest extends AbstractDockerClientTest {
 		Volume volume2 = new Volume("/opt/webapp2");
 
 		CreateContainerResponse container = dockerClient
-				.createContainerCmd("busybox")
-				.withVolumes(volume1, volume2)
+				.createContainerCmd("busybox").withVolumes(volume1, volume2)
 				.withCmd("true").exec();
 
 		LOG.info("Created container {}", container.toString());
@@ -92,7 +91,7 @@ public class StartContainerCmdImplTest extends AbstractDockerClientTest {
 		assertContainerHasVolumes(inspectContainerResponse, volume1, volume2);
 
 		assertThat(Arrays.asList(inspectContainerResponse.getVolumesRW()),
-				contains(new VolumeRW(volume1, AccessMode.ro), new VolumeRW(volume2)));
+				contains(volume1, volume2));
 
 	}
 
diff --git a/src/test/resources/busyboxDockerfile/Dockerfile b/src/test/resources/busyboxDockerfile/Dockerfile
deleted file mode 100644
index 5377ac8a..00000000
--- a/src/test/resources/busyboxDockerfile/Dockerfile
+++ /dev/null
@@ -1,3 +0,0 @@
-FROM busybox:latest
-
-CMD ["cat"]
\ No newline at end of file
diff --git a/src/test/resources/frameReaderDockerfile/Dockerfile b/src/test/resources/frameReaderDockerfile/Dockerfile
deleted file mode 100644
index 8d9b553e..00000000
--- a/src/test/resources/frameReaderDockerfile/Dockerfile
+++ /dev/null
@@ -1,13 +0,0 @@
-FROM busybox:latest
-
-# log to stdout and stderr so we can make sure logging with FrameReader works
-
-RUN echo '#! /bin/sh' > cmd.sh
-RUN echo 'sleep 1' >> cmd.sh
-RUN echo 'echo "to stdout"' >> cmd.sh
-RUN echo 'echo "to stderr" > /dev/stderr' >> cmd.sh
-# block for ever
-RUN echo 'cat' >> cmd.sh
-RUN chmod +x cmd.sh
-
-CMD ["./cmd.sh"]
\ No newline at end of file