### Question:
BufferedPartitionFetcher implements PartitionFetcher { @Override public Partition fetch(String partitionName) { int partitionPosition = partitionNames.indexOf(partitionName); if (partitionPosition < 0) { throw new PartitionNotFoundException("Unknown partition " + partitionName); } if (!buffer.containsKey(partitionName)) { bufferPartitions(partitionPosition); } return buffer.get(partitionName); } BufferedPartitionFetcher(IMetaStoreClient metastore, Table table, short bufferSize); @Override Partition fetch(String partitionName);  }### Answer:
@Test(expected = PartitionNotFoundException.class) public void unknowPartition() throws Exception { when(metastore.getPartitionsByNames(DATABASE_NAME, TABLE_NAME, Arrays.asList("a=01", "a=02", "a=03"))) .thenReturn(Arrays.asList(p01, p02, p03)); BufferedPartitionFetcher fetcher = spy(new BufferedPartitionFetcher(metastore, table, (short) 10)); fetcher.fetch("a=10"); }