-
- @Test
- public void testGetMetadataCacheWithNoArgument() throws Exception {
- MetadataCacheImpl mockImpl = mock(MetadataCacheImpl.class);
- PowerMockito.whenNew(MetadataCacheImpl.class).withNoArguments().thenReturn(mockImpl);
- Assert.assertEquals(mockImpl, MetadataCacheFactory.getInstance().getMetadataCache());
- }
-
- @Test
- public void testGetMetadataCacheWithArgument() throws Exception {
- CacheStrategies cacheStrategies = CacheStrategies.LRU;
- MetadataCacheImpl mockImpl = mock(MetadataCacheImpl.class);
- PowerMockito.whenNew(MetadataCacheImpl.class).withArguments(cacheStrategies)
- .thenReturn(mockImpl);
- Assert.assertEquals(mockImpl,
- MetadataCacheFactory.getInstance().getMetadataCache(cacheStrategies));
- }
-