### Question:
FeedCachePartition { public void close() { synchronized (this) { if (--refCount <= 0) { clear(); feedCache.removePartition(partitionId); } } } FeedCachePartition(int partitionId, FeedCache feedCache); void open(); void close(); void clear(); void setMaxNumBlocks(int numBlocks); int getMaxNumBlocks(); void add(long transactionId, ReqId reqId, int header); void addAll(List<RecordHeader> recordHeaderList); FeedData get(long transactionId);  }### Answer:
@Test public void testClose() { int numBlocks = cache.getSharedPoolSize(); assertEquals(1, cache.getNumPartitions()); long txnId = 1000; partition.add(txnId, generateReqId(txnId), generateHeader(txnId)); assertEquals(numBlocks - 1, cache.getSharedPoolSize()); partition.close(); assertEquals(0, cache.getNumPartitions()); assertEquals(numBlocks, cache.getSharedPoolSize()); assertNull(partition.get(txnId)); partition.add(txnId, generateReqId(txnId), generateHeader(txnId)); assertEquals(0, cache.getNumPartitions()); assertEquals(numBlocks, cache.getSharedPoolSize()); }