2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.config.manager.impl;
10 import java.lang.management.ManagementFactory;
11 import java.util.concurrent.locks.ReentrantLock;
13 import javax.management.MBeanServer;
15 import org.junit.After;
16 import org.junit.Before;
19 * Each test that works with platform MBeanServer should extend this class.
21 public abstract class AbstractLockedPlatformMBeanServerTest {
22 private static final ReentrantLock lock = new ReentrantLock();
23 protected static MBeanServer platformMBeanServer = ManagementFactory
24 .getPlatformMBeanServer();
27 public void acquireLock() {
32 public void unlock() {
36 public static class SimpleBean implements SimpleBeanMBean {
40 public static interface SimpleBeanMBean {