### Question:
MetaFileSmall extends BaseMetaFile { public BigInteger getTotalSize() { if (versions == null) { return BigInteger.ZERO; } else { BigInteger sum = BigInteger.ZERO; for (FileVersion version : versions) { sum = sum.add(version.getSize()); } return sum; } } MetaFileSmall(PublicKey id, List<FileVersion> versions, KeyPair chunkKey); List<FileVersion> getVersions(); KeyPair getChunkKey(); BigInteger getTotalSize(); FileVersion getNewestVersion(); FileVersion getVersionByIndex(int index);  }### Answer:
@Test public void testGetTotalSize() { List<FileVersion> versions = new ArrayList<FileVersion>(); versions.add(new FileVersion(0, 4, 0, new ArrayList<MetaChunk>())); versions.add(new FileVersion(1, 10, 1, new ArrayList<MetaChunk>())); versions.add(new FileVersion(2, 1000, 2, new ArrayList<MetaChunk>())); MetaFileSmall metaFileSmall = new MetaFileSmall(keys.getPublic(), versions, keys); Assert.assertEquals(4 + 10 + 1000, metaFileSmall.getTotalSize().intValue()); }