### Question:
ConditionalMutation extends Mutation { public List<Condition> getConditions() { return Collections.unmodifiableList(conditions); } ConditionalMutation(byte[] row, Condition... conditions);  ConditionalMutation(byte[] row, int start, int length, Condition... conditions);  ConditionalMutation(Text row, Condition... conditions);  ConditionalMutation(CharSequence row, Condition... conditions);  ConditionalMutation(ByteSequence row, Condition... conditions);  ConditionalMutation(ConditionalMutation cm); void addCondition(Condition condition); List<Condition> getConditions(); @Override boolean equals(Object o); @Override int hashCode(); @Override void setReplicationSources(Set<String> sources);  }### Answer:
@Test public void testConstruction_ByteArray() { assertArrayEquals(ROW, cm.getRow()); List<Condition> cs = cm.getConditions(); assertEquals(2, cs.size()); assertEquals(c1, cs.get(0)); assertEquals(c2, cs.get(1)); }
@Test public void testConstruction_ByteArray_StartAndLength() { cm = new ConditionalMutation(ROW, 1, 1, c1, c2); assertArrayEquals("o".getBytes(UTF_8), cm.getRow()); List<Condition> cs = cm.getConditions(); assertEquals(2, cs.size()); assertEquals(c1, cs.get(0)); assertEquals(c2, cs.get(1)); }
@Test public void testConstruction_Text() { cm = new ConditionalMutation(new Text(ROW), c1, c2); assertArrayEquals(ROW, cm.getRow()); List<Condition> cs = cm.getConditions(); assertEquals(2, cs.size()); assertEquals(c1, cs.get(0)); assertEquals(c2, cs.get(1)); }
@Test public void testConstruction_CharSequence() { cm = new ConditionalMutation(new String(ROW, UTF_8), c1, c2); assertArrayEquals(ROW, cm.getRow()); List<Condition> cs = cm.getConditions(); assertEquals(2, cs.size()); assertEquals(c1, cs.get(0)); assertEquals(c2, cs.get(1)); }
@Test public void testConstruction_ByteSequence() { cm = new ConditionalMutation(new ArrayByteSequence(ROW), c1, c2); assertArrayEquals(ROW, cm.getRow()); List<Condition> cs = cm.getConditions(); assertEquals(2, cs.size()); assertEquals(c1, cs.get(0)); assertEquals(c2, cs.get(1)); }
@Test public void testCopyConstructor() { ConditionalMutation cm2 = new ConditionalMutation(cm); assertArrayEquals(cm.getRow(), cm2.getRow()); assertEquals(cm.getConditions(), cm2.getConditions()); }