### Question:
SplitOutputStream extends OutputStream { public void write(int data) throws IOException { int i; for (i = m_sinks.length; --i >= 0; ) m_sinks[i].write(data); } SplitOutputStream(OutputStream ... sinks); void write(int data); void write(byte buffer[], int offset, int length); void flush(); void close();  }### Answer:
@Test public void writeLengthZero() throws IOException { m_fixture.write(new byte[1], 0, 0); }
@Test public void writeArray() throws IOException { byte buffer[]; buffer = new byte[]{2, 3, 5, 7, 11, 13}; m_fixture.write(buffer); }
@Test public void writeByte() throws IOException { m_fixture.write(123); }
@Test(expected = NullPointerException.class) public void writeNullBuffer() throws IOException { m_fixture.write(null, 0, 1); }
@Test(expected = IndexOutOfBoundsException.class) public void writeIndexNegOne() throws IOException { m_fixture.write(new byte[0], -1, 0); }
@Test(expected = IndexOutOfBoundsException.class) public void writeLengthNegOne() throws IOException { m_fixture.write(new byte[0], 0, -1); }
@Test(expected = IndexOutOfBoundsException.class) public void writeBeyondEnd() throws IOException { m_fixture.write(new byte[16], 8, 9); }