/** Sets up the global values for all the tests. */
 @Before
 public void setUpTest() {
   ServiceDirectory testDirectory =
       new TestServiceDirectory()
           .add(ControlPlaneMonitorService.class, mockControlPlaneMonitorService);
   BaseResource.setServiceDirectory(testDirectory);
 }
 /** Sets up mocked config service. */
 @Before
 public void setUpMocks() {
   mockNetworkConfigService = new MockNetworkConfigService();
   ServiceDirectory testDirectory =
       new TestServiceDirectory().add(NetworkConfigService.class, mockNetworkConfigService);
   BaseResource.setServiceDirectory(testDirectory);
 }
  /** Sets up the global values for all the tests. */
  @Before
  public void setUpTest() {
    SfcCodecContext context = new SfcCodecContext();

    ServiceDirectory testDirectory =
        new TestServiceDirectory()
            .add(FlowClassifierService.class, flowClassifierService)
            .add(CodecService.class, context.codecManager());
    BaseResource.setServiceDirectory(testDirectory);
  }
  /** Initializes test mocks and environment. */
  @Before
  public void setUpTest() {
    mockMetricsService = createMock(MetricsService.class);

    // Register the services needed for the test
    final CodecManager codecService = new CodecManager();
    codecService.activate();
    ServiceDirectory testDirectory =
        new TestServiceDirectory()
            .add(MetricsService.class, mockMetricsService)
            .add(CodecService.class, codecService);
    BaseResource.setServiceDirectory(testDirectory);
  }