@Override
    public String toString() {
        long inKB = size / KB_COEFFICIENT;

        if (inKB == 0)
            return size + " Bytes";

        long inMB = size / MB_COEFFICIENT;
        if (inMB == 0) {
            return inKB + " KB";
        }

        long inGB = size / GB_COEFFICIENT;
        if (inGB == 0) {
            return inMB + " MB";
        }

        return inGB + " GB";

    }
@Test
    public void testToString() {
        {
            FileSize fs = new FileSize(8);
            assertEquals("8 Bytes", fs.toString());
        }

        {
            FileSize fs = new FileSize(8 * 1024 + 3);
            assertEquals("8 KB", fs.toString());
        }

        {
            FileSize fs = new FileSize(8 * 1024 * 1024 + 3 * 1024);
            assertEquals("8 MB", fs.toString());
        }

        {
            FileSize fs = new FileSize(8 * 1024 * 1024 * 1024L);
            assertEquals("8 GB", fs.toString());
        }
    }