}
});
when(regionFactory.setCacheWriter(any(CacheWriter.class))).thenAnswer(new Answer<RegionFactory>(){
@Override public RegionFactory answer(InvocationOnMock invocation) throws Throwable {
CacheWriter cacheWriter = (CacheWriter) invocation.getArguments()[0];
attributesFactory.setCacheWriter(cacheWriter);
return regionFactory;
}
});