Stat implements Serializable, Cloneable { public long getSize() { guard(StatAttribute.SIZE); return _size; }  int getDev(); void setDev(int dev); int getIno(); void setIno(int ino); int getMode(); void setMode(int mode); int getNlink(); void setNlink(int nlink); int getUid(); void setUid(int owner); int getGid(); void setGid(int group); int getRdev(); void setRdev(int rdev); long getSize(); void setSize(long size); long getATime(); void setATime(long atime); long getMTime(); void setMTime(long mtime); long getCTime(); void setCTime(long ctime); long getFileId(); void setFileid(long fileid); long getGeneration(); void setGeneration(long generation); Type type(); static String modeToString(int mode); static String sizeToString(long bytes); @Override Stat clone(); @Override String toString(); boolean isDefined(StatAttribute attr); void undefine(StatAttribute attr); static final int S_TYPE; static final int S_PERMS; static final int S_IFSOCK; static final int S_IFLNK; static final int S_IFREG; static final int S_IFBLK; static final int S_IFDIR; static final int S_IFCHR; static final int S_IFIFO; }
@Test(expected = IllegalStateException.class) public void testNotDefeinedGetSize() { new Stat().getSize(); }
@Test public void testGetSize() { Stat stat = new Stat(); stat.setSize(1); assertEquals(1, stat.getSize()); }