Example usage for org.springframework.data.gemfire.snapshot SnapshotServiceFactoryBean getCache

List of usage examples for org.springframework.data.gemfire.snapshot SnapshotServiceFactoryBean getCache

Introduction

In this page you can find the example usage for org.springframework.data.gemfire.snapshot SnapshotServiceFactoryBean getCache.

Prototype

protected Cache getCache() 

Source Link

Document

Gets a reference to the Pivotal GemFire Cache for which the snapshot will be taken.

Usage

From source file:org.springframework.data.gemfire.snapshot.SnapshotServiceFactoryBeanTest.java

@Test
public void setAndGetCacheSuccessfully() {
    Cache mockCache = mock(Cache.class, "MockCache");
    SnapshotServiceFactoryBean factoryBean = new SnapshotServiceFactoryBean();

    factoryBean.setCache(mockCache);//from  w  ww  .  ja  va 2  s  .  c  om

    assertThat(factoryBean.getCache(), is(sameInstance(mockCache)));
}