}
@Test
public void testTableReadData() throws SqlJetException, UnsupportedEncodingException {
boolean passed = false;
final ISqlJetBtreeTable master = new SqlJetBtreeTable(btreeCopy, ISqlJetDbHandle.MASTER_ROOT, false, false);
try {
Assert.assertTrue(!master.eof());
for (ISqlJetBtreeRecord r1 = master.getRecord(); !master.eof(); master.next(), r1 = master.getRecord()) {
Assert.assertNotNull(r1.getFields());
Assert.assertTrue(!r1.getFields().isEmpty());
final String type = SqlJetUtility.toString(r1.getFields().get(0).valueText(SqlJetEncoding.UTF8));
Assert.assertNotNull(type);
final String name = SqlJetUtility.toString(r1.getFields().get(1).valueText(SqlJetEncoding.UTF8));
Assert.assertNotNull(name);
final long page = r1.getFields().get(3).intValue();
if ("table".equals(type.trim())) {
logger.info(name.trim());
Assert.assertTrue(page > 0);
final ISqlJetBtreeTable data = new SqlJetBtreeTable(btreeCopy, (int) page, false, false);
Assert.assertTrue(!data.eof());
for (ISqlJetBtreeRecord r2 = data.getRecord(); !data.eof(); data.next(), r2 = data.getRecord()) {
Assert.assertNotNull(r2.getFields());
Assert.assertTrue(!r2.getFields().isEmpty());
for (ISqlJetVdbeMem field : r2.getFields()) {
final ISqlJetMemoryPointer value = field.valueText(SqlJetEncoding.UTF8);
Assert.assertNotNull(value);