### Question:
PipelineStateManager { public List<Pipeline> getPipelines() { return pipelineStateMap.getPipelines(); } PipelineStateManager(); void addPipeline(Pipeline pipeline); List<Pipeline> getPipelines(); void activatePipeline(PipelineID pipelineID); void deactivatePipeline(PipelineID pipelineID); void updatePipelineState(PipelineID id, PipelineState newState);  }### Answer:
@Test public void testGetPipelines() throws IOException { Assert.assertTrue(stateManager.getPipelines().isEmpty()); Set<Pipeline> pipelines = new HashSet<>(); Pipeline pipeline = createDummyPipeline(1); stateManager.addPipeline(pipeline); stateManager.openPipeline(pipeline.getId()); pipelines.add(pipeline); pipeline = createDummyPipeline(1); stateManager.addPipeline(pipeline); stateManager.openPipeline(pipeline.getId()); pipelines.add(pipeline); Set<Pipeline> pipelines1 = new HashSet<>(stateManager.getPipelines( HddsProtos.ReplicationType.RATIS)); Assert.assertEquals(pipelines1.size(), pipelines.size()); pipelines1 = new HashSet<>(stateManager.getPipelines()); Assert.assertEquals(pipelines1.size(), pipelines.size()); for (Pipeline pipeline1 : pipelines) { removePipeline(pipeline1); } }