assertNull(result);
}
@Test
public void testExpirations() {
DataGrid dataGrid = new TransientDataGrid();
String result = dataGrid.write("key", "value", 100);
assertEquals("value", result);
result = dataGrid.read("key");
assertEquals(result, "value");
sleep(110);
result = dataGrid.read("key");
assertNull(result);
result = dataGrid.write("key", "value", 100);
assertEquals(result, "value");
result = dataGrid.read("key");
assertEquals(result, "value");
sleep(110);
result = dataGrid.take("key");
assertNull(result);
}