### Question:
StorageManager implements StoreManager { DiskManager getDiskManager(PartitionId id) { return partitionToDiskManager.get(id); } StorageManager(StoreConfig storeConfig, DiskManagerConfig diskManagerConfig,
      ScheduledExecutorService scheduler, MetricRegistry registry, StoreKeyFactory keyFactory, ClusterMap clusterMap,
      DataNodeId dataNodeId, MessageStoreHardDelete hardDelete, List<ClusterParticipant> clusterParticipants, Time time,
      MessageStoreRecovery recovery, AccountService accountService); void start(); @Override Store getStore(PartitionId id); Store getStore(PartitionId id, boolean skipStateCheck); @Override ReplicaId getReplica(String partitionName); @Override Collection<PartitionId> getLocalPartitions(); @Override ServerErrorCode checkLocalPartitionStatus(PartitionId partition, ReplicaId localReplica); @Override boolean scheduleNextForCompaction(PartitionId id); @Override boolean controlCompactionForBlobStore(PartitionId id, boolean enabled); void shutdown(); @Override boolean addBlobStore(ReplicaId replica); @Override boolean startBlobStore(PartitionId id); @Override boolean shutdownBlobStore(PartitionId id); @Override boolean removeBlobStore(PartitionId id); @Override List<PartitionId> setBlobStoreStoppedState(List<PartitionId> partitionIds, boolean markStop);  }### Answer:
@Test public void getDiskManagerTest() throws Exception { MockDataNodeId dataNode = clusterMap.getDataNodes().get(0); List<ReplicaId> replicas = clusterMap.getReplicaIds(dataNode); List<MockDataNodeId> dataNodes = new ArrayList<>(); dataNodes.add(dataNode); MockPartitionId invalidPartition = new MockPartitionId(Long.MAX_VALUE, MockClusterMap.DEFAULT_PARTITION_CLASS, dataNodes, 0); List<? extends ReplicaId> invalidPartitionReplicas = invalidPartition.getReplicaIds(); StorageManager storageManager = createStorageManager(dataNode, metricRegistry, null); PartitionId id = null; storageManager.start(); assertEquals("There should be 1 unexpected partition reported", 1, getNumUnrecognizedPartitionsReported()); for (ReplicaId replica : replicas) { id = replica.getPartitionId(); assertNotNull("DiskManager should not be null for valid partition", storageManager.getDiskManager(id)); } ReplicaId replica = invalidPartitionReplicas.get(0); id = replica.getPartitionId(); assertNull("DiskManager should be null for invalid partition", storageManager.getDiskManager(id)); shutdownAndAssertStoresInaccessible(storageManager, replicas); }