### Question:
ObjectMappedTableDataset extends AbstractDataset implements ObjectMappedTable<T> { @Override public List<Split> getSplits() { return table.getSplits(); } ObjectMappedTableDataset(String name, Table table, TypeRepresentation typeRep,
                                  Schema objectSchema, @Nullable ClassLoader classLoader); @WriteOnly @Override void write(String key, T object); @WriteOnly @Override void write(byte[] key, T object); @ReadOnly @Override T read(String key); @ReadOnly @Override T read(byte[] key); @ReadOnly @Override CloseableIterator<KeyValue<byte[], T>> scan(@Nullable String startRow, @Nullable String stopRow); @ReadOnly @Override CloseableIterator<KeyValue<byte[], T>> scan(byte[] startRow, byte[] stopRow); @ReadOnly @Override CloseableIterator<KeyValue<byte[], T>> scan(Scan scan); @WriteOnly @Override void delete(String key); @WriteOnly @Override void delete(byte[] key); @Override Type getRecordType(); @Override List<Split> getSplits(); @Override List<Split> getSplits(int numSplits, byte[] start, byte[] stop); @ReadOnly @Override RecordScanner<StructuredRecord> createSplitRecordScanner(Split split); @ReadOnly @Override SplitReader<byte[], T> createSplitReader(Split split); @Override void write(StructuredRecord structuredRecord);  }### Answer:
@Test public void testGetSplits() throws Exception { dsFrameworkUtil.createInstance(ObjectMappedTable.class.getName(), RECORDS_ID, ObjectMappedTableProperties.builder().setType(Record.class).build()); try { final ObjectMappedTableDataset<Record> records = dsFrameworkUtil.getInstance(RECORDS_ID); TransactionExecutor txnl = dsFrameworkUtil.newInMemoryTransactionExecutor((TransactionAware) records); final Record record = new Record(Integer.MAX_VALUE, Long.MAX_VALUE, Float.MAX_VALUE, Double.MAX_VALUE, "foobar", Bytes.toBytes("foobar"), ByteBuffer.wrap(Bytes.toBytes("foobar")), UUID.randomUUID()); final byte[] rowkey = Bytes.toBytes("row1"); txnl.execute(new TransactionExecutor.Subroutine() { @Override public void apply() throws Exception { records.write(rowkey, record); } }); txnl.execute(new TransactionExecutor.Subroutine() { @Override public void apply() throws Exception { List<Split> splits = records.getSplits(1, null, rowkey); List<Record> recordsRead = new ArrayList<>(); for (Split split : splits) { SplitReader<byte[], Record> splitReader = records.createSplitReader(split); try { splitReader.initialize(split); while (splitReader.nextKeyValue()) { recordsRead.add(splitReader.getCurrentValue()); } } finally { splitReader.close(); } } Assert.assertEquals(0, recordsRead.size()); } }); txnl.execute(new TransactionExecutor.Subroutine() { @Override public void apply() throws Exception { List<Split> splits = records.getSplits(1, rowkey, null); List<Record> recordsRead = new ArrayList<>(); for (Split split : splits) { SplitReader<byte[], Record> splitReader = records.createSplitReader(split); try { splitReader.initialize(split); while (splitReader.nextKeyValue()) { recordsRead.add(splitReader.getCurrentValue()); } } finally { splitReader.close(); } } Assert.assertEquals(1, recordsRead.size()); Assert.assertEquals(record, recordsRead.get(0)); } }); } finally { dsFrameworkUtil.deleteInstance(RECORDS_ID); } }