### Question:
SingletonIndexCursor extends AbstractIndexCursor<V> { public IndexEntry<V, String> get() throws CursorException { checkNotClosed(); if ( onSingleton ) { return singleton; } if ( beforeFirst ) { throw new InvalidCursorPositionException( I18n.err( I18n.ERR_705 ) ); } else { throw new InvalidCursorPositionException( I18n.err( I18n.ERR_706 ) ); } } SingletonIndexCursor( PartitionTxn partitionTxn, IndexEntry<V, String> singleton ); @Override boolean available(); @Override void beforeFirst(); @Override void afterLast(); @Override boolean first(); @Override boolean last(); @Override boolean isFirst(); @Override boolean isLast(); @Override boolean isAfterLast(); @Override boolean isBeforeFirst(); @Override boolean previous(); @Override boolean next(); IndexEntry<V, String> get(); @Override void close(); @Override void close( Exception cause );  }### Answer:
@Test(expected = InvalidCursorPositionException.class) public void testGetNotPositioned() throws Exception { indexCursor.get(); }
@Test public void testGet() throws Exception { indexCursor.next(); assertNotNull( indexCursor.get() ); indexCursor.first(); assertNotNull( indexCursor.get() ); indexCursor.last(); assertNotNull( indexCursor.get() ); indexCursor.afterLast(); assertTrue( indexCursor.previous() ); assertNotNull( indexCursor.get() ); indexCursor.beforeFirst(); assertTrue( indexCursor.next() ); assertNotNull( indexCursor.get() ); }