CompoundContext { public stateid4 currentStateid() throws ChimeraNFSException { if(_currentStateid == null) throw new BadStateidException("no current stateid"); return _currentStateid; } CompoundContext(CompoundContextBuilder builder); RpcCall getRpcCall(); Subject getSubject(); VirtualFileSystem getFs(); Optional<NFSv41DeviceManager> getDeviceManager(); LockManager getLm(); int getMinorversion(); Inode currentInode(); void currentInode(Inode inode); void clearCurrentInode(); void restoreSavedInode(); Inode savedInode(); void saveCurrentInode(); void setSession(NFSv41Session session); NFSv41Session getSession(); NFSv4StateHandler getStateHandler(); SessionSlot getSessionSlot(); void setSessionSlot(SessionSlot slot); boolean cacheThis(); void setCacheThis(boolean cacheThis); List<nfs_resop4> getCache(); void setCache(List<nfs_resop4> cache); stateid4 currentStateid(); void currentStateid(stateid4 currentStateid); ExportTable getExportTable(); ServerIdProvider getServerIdProvider(); Principal getPrincipal(); int getExchangeIdFlags(); InetSocketAddress getRemoteSocketAddress(); InetSocketAddress getLocalSocketAddress(); verifier4 getRebootVerifier();  }
@Test(expected = BadStateidException.class) public void testNoCurrentStateid() throws ChimeraNFSException { context.currentStateid(); }
@Test public void testCurrentStateid() throws ChimeraNFSException { stateid4 stateid = mock(stateid4.class); context.currentStateid(stateid); assertSame(stateid, context.currentStateid()); }