### Question:
SCMContainerManager implements ContainerManager { @Override public ContainerInfo getContainer(final ContainerID containerID) throws ContainerNotFoundException { return containerStateManager.getContainer(containerID); } SCMContainerManager(
      final ConfigurationSource conf,
      Table<ContainerID, ContainerInfo> containerStore,
      BatchOperationHandler batchHandler,
      PipelineManager pipelineManager); @VisibleForTesting // TODO: remove this later. ContainerStateManager getContainerStateManager(); @Override Set<ContainerID> getContainerIDs(); @Override List<ContainerInfo> getContainers(); @Override List<ContainerInfo> getContainers(LifeCycleState state); Integer getContainerCountByState(LifeCycleState state); @Override ContainerInfo getContainer(final ContainerID containerID); @Override boolean exists(ContainerID containerID); @Override List<ContainerInfo> listContainer(ContainerID startContainerID,
      int count); @Override ContainerInfo allocateContainer(final ReplicationType type,
      final ReplicationFactor replicationFactor, final String owner); @Override void deleteContainer(ContainerID containerID); @Override HddsProtos.LifeCycleState updateContainerState(
      ContainerID containerID, HddsProtos.LifeCycleEvent event); void updateDeleteTransactionId(Map<Long, Long> deleteTransactionMap); ContainerInfo getMatchingContainer(final long sizeRequired,
      String owner, Pipeline pipeline); @SuppressWarnings("squid:S2445") ContainerInfo getMatchingContainer(final long sizeRequired,
                                            String owner, Pipeline pipeline,
                                            Collection<ContainerID>
                                                      excludedContainers); Set<ContainerReplica> getContainerReplicas(
      final ContainerID containerID); void updateContainerReplica(final ContainerID containerID,
      final ContainerReplica replica); void removeContainerReplica(final ContainerID containerID,
      final ContainerReplica replica); @Override void close(); void notifyContainerReportProcessing(boolean isFullReport,
      boolean success); Lock getLock();  }### Answer:
@Test public void testGetContainer() throws IOException { ContainerInfo containerInfo = containerManager.allocateContainer( replicationType, replicationFactor, OzoneConsts.OZONE); Assert.assertNotNull(containerInfo); Pipeline pipeline = pipelineManager .getPipeline(containerInfo.getPipelineID()); Assert.assertNotNull(pipeline); Assert.assertEquals(containerInfo, containerManager.getContainer(containerInfo.containerID())); }
@Test public void testgetNoneExistentContainer() { try { containerManager.getContainer(ContainerID.valueof( random.nextInt() & Integer.MAX_VALUE)); Assert.fail(); } catch (ContainerNotFoundException ex) { } }