### Question:
OpenedDataObjInp extends AbstractIRODSPackingInstruction { public static final OpenedDataObjInp instanceForFileWrite(final int fileDescriptor, final long offset, final long length) { return new OpenedDataObjInp(WRITE_API_NBR, offset, fileDescriptor, 0, length, false); } private  OpenedDataObjInp(final int apiNumber, final long offset, final int fileDescriptor, final int whence,
			final long length, final boolean putOprNeeded); static final OpenedDataObjInp instanceForFileSeek(final long offset, final int fileDescriptor,
			final int whence); static final OpenedDataObjInp instanceForFileRead(final int fileDescriptor, final long length); static final OpenedDataObjInp instanceForFileWrite(final int fileDescriptor, final long offset,
			final long length); static final OpenedDataObjInp instanceForFilePut(final int fileDescriptor, final long length); static final OpenedDataObjInp instanceForFileCloseWithPutOpr(final int fileDescriptor); static final OpenedDataObjInp instanceForFileClose(final int fileDescriptor); @Override Tag getTagValue(); long getOffset(); int getOperationType(); int getFileDescriptor(); int getWhence(); static final String PI_TAG; static final String L1_DESC_INX; static final String LEN; static final String WHENCE; static final String OPR_TYPE; static final String OFFSET; static final String BYTES_WRITTEN; static final int SEEK_API_NBR; static final int READ_API_NBR; static final int WRITE_API_NBR; static final int CLOSE_API_NBR; static final int DEFAULT_OPERATION_TYPE; static final int SEEK_START; static final int SEEK_CURRENT; static final int SEEK_END; }### Answer:
@Test public final void testInstanceForFileWrite() throws Exception { OpenedDataObjInp openedDataObjInp = OpenedDataObjInp.instanceForFilePut(3, 4194304L); StringBuilder sb = new StringBuilder(); sb.append("<OpenedDataObjInp_PI>"); sb.append("<l1descInx>3</l1descInx>\n"); sb.append("<len>4194304</len>\n"); sb.append("<whence>0</whence>\n"); sb.append("<oprType>0</oprType>\n"); sb.append("<offset>0</offset>\n"); sb.append("<bytesWritten>0</bytesWritten>\n"); sb.append("<KeyValPair_PI><ssLen>0</ssLen>\n"); sb.append("</KeyValPair_PI>\n"); sb.append("</OpenedDataObjInp_PI>\n"); Assert.assertEquals("did not generate expected XML", sb.toString(), openedDataObjInp.getParsedTags()); }