### Question:
ConfigProperties { public static String getProperty(Class<?> classParam, final String propertyStr) { return getProperty(classParam, propertyStr, null); } private  ConfigProperties(); static String getProperty(Class<?> classParam, final String propertyStr); static String getProperty(Class<?> classParam, final String propertyStr, final String defaultValue); static void overrideProperty(String property, String value);  }### Answer:
@Test public void testGetProperty() { Bundle bundleWithoutBundleNoContext = mock(Bundle.class); Bundle bundle = mock(Bundle.class); PowerMockito.mockStatic(FrameworkUtil.class); PowerMockito.when(FrameworkUtil.getBundle(this.getClass())).thenReturn(bundle); PowerMockito.when(FrameworkUtil.getBundle(ConfigPropertiesTestMockingBundleNoContext.class)) .thenReturn(bundleWithoutBundleNoContext); BundleContext bundleContext = mock(BundleContext.class); when(bundle.getBundleContext()).thenReturn(bundleContext); when(bundleWithoutBundleNoContext.getBundleContext()).thenReturn(null); when(bundleContext.getProperty(eq(TEST_PROPERTY_KEY1))).thenReturn(TEST_PROPERTY_MOCK_VALUE1); System.setProperty(TEST_PROPERTY_KEY2, TEST_PROPERTY_MOCK_VALUE2); assertNull(FrameworkUtil.getBundle(ConfigPropertiesTestMocking.class)); assertEquals(FrameworkUtil.getBundle(ConfigPropertiesTest.class), bundle); assertEquals(FrameworkUtil.getBundle(ConfigPropertiesTestMockingBundleNoContext.class), bundleWithoutBundleNoContext); assertNull(bundleWithoutBundleNoContext.getBundleContext()); assertEquals(bundle.getBundleContext(), bundleContext); final String value31 = ConfigProperties.getProperty(this.getClass(), TEST_PROPERTY_KEY2); assertEquals(TEST_PROPERTY_MOCK_VALUE2, value31); final String value41 = ConfigProperties.getProperty(ConfigPropertiesTestMocking.class, TEST_PROPERTY_KEY1); assertNull(value41); final String value42 = ConfigProperties.getProperty(ConfigPropertiesTestMockingBundleNoContext.class, TEST_PROPERTY_KEY1); assertNull(value42); final String value43 = ConfigProperties.getProperty(this.getClass(), TEST_PROPERTY_KEY_NOT_FOUND); assertNull(value43); final String value5 = ConfigProperties.getProperty(this.getClass(), TEST_PROPERTY_KEY_NOT_FOUND, DEFAULT_PROPERTY_VALUE); assertEquals(DEFAULT_PROPERTY_VALUE, value5); final String value61 = ConfigProperties.getProperty(this.getClass(), TEST_PROPERTY_KEY1); assertEquals(TEST_PROPERTY_MOCK_VALUE1, value61); final String value62 = ConfigProperties.getProperty(this.getClass(), TEST_PROPERTY_KEY1, DEFAULT_PROPERTY_VALUE); assertEquals(TEST_PROPERTY_MOCK_VALUE1, value62); }