@Test
public void testLatestCellGetXML() throws IOException, JAXBException {
final String path = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
CellSetModel cellSetModel = new CellSetModel();
RowModel rowModel = new RowModel(ROW_1);
CellModel cellOne = new CellModel(Bytes.toBytes(COLUMN_1), 1L, Bytes.toBytes(VALUE_1));
CellModel cellTwo = new CellModel(Bytes.toBytes(COLUMN_1), 2L, Bytes.toBytes(VALUE_2));
rowModel.addCell(cellOne);
rowModel.addCell(cellTwo);
cellSetModel.addRow(rowModel);
StringWriter writer = new StringWriter();
marshaller.marshal(cellSetModel, writer);
Response response = client.put(path, Constants.MIMETYPE_XML, Bytes.toBytes(writer.toString()));
assertEquals(response.getCode(), 200);
response = getValueXML(TABLE, ROW_1, COLUMN_1);
assertEquals(response.getCode(), 200);
assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
CellSetModel cellSet = (CellSetModel) unmarshaller.unmarshal(new ByteArrayInputStream(response
.getBody()));
assertTrue(cellSet.getRows().size() == 1);
assertTrue(cellSet.getRows().get(0).getCells().size() == 1);
CellModel cell = cellSet.getRows().get(0).getCells().get(0);
assertEquals(VALUE_2, Bytes.toString(cell.getValue()));
assertEquals(2L, cell.getTimestamp());
response = deleteRow(TABLE, ROW_1);
assertEquals(response.getCode(), 200);
}