NoSqlTypedSession s = mgr.getTypedSession();
//SAVE the value ZERO
String cf = "TimeSeriesData";
TypedRow row1 = s.createTypedRow(cf);
row1.setRowKey(BigInteger.valueOf(25));
row1.addColumn("temp", new BigDecimal(0));
row1.addColumn("someName", "dean");
s.put(cf, row1);
//SAVE a null value
TypedRow row2 = s.createTypedRow(cf);
row2.setRowKey(BigInteger.valueOf(26));
row2.addColumn("temp", null);
row2.addColumn("someName", "dean");
s.put(cf, row2);
//SAVE with NO column
TypedRow row3 = s.createTypedRow(cf);
row3.setRowKey(BigInteger.valueOf(27));
row3.addColumn("someName", "dean");
s.put(cf, row3);
byte[] name = new byte[] {1,2,3,4};
//SAVE with zero length byte array
TypedRow row4 = s.createTypedRow(cf);
row4.setRowKey(BigInteger.valueOf(28));
row4.addColumn(name, new byte[0], null);
row4.addColumn("someName", "dean");
s.put(cf, row4);
//SAVE with zero length byte array
TypedRow row5 = s.createTypedRow(cf);
row5.setRowKey(BigInteger.valueOf(29));
row5.addColumn("other", "");
row5.addColumn("someName", "dean");
s.put(cf, row5);
//SAVE zero for int
TypedRow row6 = s.createTypedRow(cf);
row6.setRowKey(BigInteger.valueOf(30));
row6.addColumn("other", 0);
row6.addColumn("nullInt", null);
row6.addColumn("someName", "dean");
s.put(cf, row6);
s.flush();
//NOW, let's find the row we put
TypedRow result1 = s.find(cf, row1.getRowKey());
TypedRow result2 = s.find(cf, row2.getRowKey());
TypedRow result3 = s.find(cf, row3.getRowKey());
TypedRow result4 = s.find(cf, row4.getRowKey());
TypedRow result5 = s.find(cf, row5.getRowKey());
TypedRow result6 = s.find(cf, row6.getRowKey());
TypedColumn column1 = result1.getColumn("temp");
Assert.assertNotNull(column1);
Object val = column1.getValue();
Assert.assertEquals(new BigDecimal(0), val);
TypedColumn column2 = result2.getColumn("temp");
Assert.assertNotNull(column2);
Object val2 = column2.getValue();
Assert.assertNull(val2);
TypedColumn column3 = result3.getColumn("temp");
Assert.assertNull(column3);
TypedColumn column4 = result4.getColumn(name);
Assert.assertNotNull(column4);
byte[] valueRaw = column4.getValueRaw();
Assert.assertNull(valueRaw);
TypedColumn column5 = result5.getColumn("other");
Assert.assertNotNull(column5);
String value = (String) column5.getValue(String.class);
Assert.assertEquals(null, value);
TypedColumn column6 = result6.getColumn("other");
Assert.assertNotNull(column6);
int value6 = (Integer) column6.getValue(Integer.class);
Assert.assertEquals(0, value6);
TypedColumn column6b = result6.getColumn("nullInt");
Integer val6b = column6b.getValue(Integer.class);
Assert.assertNull(val6b);
}