import static org.mockito.Mockito.*;
public class CacheableMetadataProviderTestCase extends TestCase {
public void testGetMetadatas() throws Exception {
MetadataProvider delegate = mock(MetadataProvider.class);
CacheableMetadataProvider provider = new CacheableMetadataProvider(delegate);
Element returned = new Element("test", null);
when(delegate.getMetadatas()).thenReturn(Collections.singletonList(returned));
provider.getMetadatas();
provider.getMetadatas();
provider.getMetadatas();
provider.getMetadatas();