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;
12 import javax.management.MBeanServer;
13 import org.junit.After;
14 import org.junit.Before;
17 * Each test that works with platform MBeanServer should extend this class.
19 public abstract class AbstractLockedPlatformMBeanServerTest {
20 private static final ReentrantLock lock = new ReentrantLock();
21 protected static MBeanServer platformMBeanServer = ManagementFactory
22 .getPlatformMBeanServer();
25 public void acquireLock() {
30 public void unlock() {
34 public static class SimpleBean implements SimpleBeanMBean {
38 public static interface SimpleBeanMBean {