InputStream input = rep.read(); byte[] inputBytes = AdminTestUtil.copy(input); assert AdminTestUtil.byteArraysEqual(inputBytes, testContent) : "We got something different than 'initial' from read: " + new String(inputBytes); input = rep.read(); inputBytes = AdminTestUtil.copy(input); assert AdminTestUtil.byteArraysEqual(inputBytes, newTestContent) : "We got something different than 'new' from read: " + new String(inputBytes); input = rep.read(); inputBytes = AdminTestUtil.copy(input); assert AdminTestUtil.byteArraysEqual(inputBytes, testContent) : "We got something different than 'initial' from read: " + new String(inputBytes);