### Question:
OzoneContainer { @VisibleForTesting public ContainerSet getContainerSet() { return containerSet; } OzoneContainer(DatanodeDetails datanodeDetails, ConfigurationSource
      conf, StateContext context, CertificateClient certClient); GrpcTlsConfig getTlsClientConfig(); void start(String scmId); void stop(); void handleVolumeFailures(); @VisibleForTesting ContainerSet getContainerSet(); PipelineReportsProto getPipelineReport(); XceiverServerSpi getWriteChannel(); XceiverServerSpi getReadChannel(); ContainerController getController(); StorageContainerDatanodeProtocolProtos.NodeReportProto getNodeReport(); @VisibleForTesting ContainerDispatcher getDispatcher(); MutableVolumeSet getVolumeSet();  }### Answer:
@Test public void testBuildContainerMap() throws Exception { for (HddsVolume volume : volumeSet.getVolumesList()) { volume.format(UUID.randomUUID().toString()); commitSpaceMap.put(getVolumeKey(volume), Long.valueOf(0)); } for (int i = 0; i < numTestContainers; i++) { long freeBytes = 0; long volCommitBytes; long maxCap = (long) StorageUnit.GB.toBytes(1); HddsVolume myVolume; keyValueContainerData = new KeyValueContainerData(i, layout, maxCap, UUID.randomUUID().toString(), datanodeDetails.getUuidString()); keyValueContainer = new KeyValueContainer( keyValueContainerData, conf); keyValueContainer.create(volumeSet, volumeChoosingPolicy, scmId); myVolume = keyValueContainer.getContainerData().getVolume(); freeBytes = addBlocks(keyValueContainer, 2, 3); volCommitBytes = commitSpaceMap.get(getVolumeKey(myVolume)).longValue(); Preconditions.checkState(freeBytes >= 0); commitSpaceMap.put(getVolumeKey(myVolume), Long.valueOf(volCommitBytes + freeBytes)); } DatanodeStateMachine stateMachine = Mockito.mock( DatanodeStateMachine.class); StateContext context = Mockito.mock(StateContext.class); Mockito.when(stateMachine.getDatanodeDetails()).thenReturn(datanodeDetails); Mockito.when(context.getParent()).thenReturn(stateMachine); OzoneContainer ozoneContainer = new OzoneContainer(datanodeDetails, conf, context, null); ContainerSet containerset = ozoneContainer.getContainerSet(); assertEquals(numTestContainers, containerset.containerCount()); verifyCommittedSpace(ozoneContainer); }