}
});
when(regionFactory.setCustomEntryIdleTimeout(any(CustomExpiry.class))).thenAnswer(new Answer<RegionFactory>(){
@Override public RegionFactory answer(InvocationOnMock invocation) throws Throwable {
CustomExpiry customEntryIdleTimeout = (CustomExpiry) invocation.getArguments()[0];
attributesFactory.setCustomEntryIdleTimeout(customEntryIdleTimeout);
return regionFactory;
}
});
when(regionFactory.setEntryTimeToLive(any(ExpirationAttributes.class))).thenAnswer(new Answer<RegionFactory>(){
@Override public RegionFactory answer(InvocationOnMock invocation) throws Throwable {
ExpirationAttributes entryTimeToLive = (ExpirationAttributes) invocation.getArguments()[0];
attributesFactory.setEntryTimeToLive(entryTimeToLive);
return regionFactory;
}
});
when(regionFactory.setCustomEntryTimeToLive(any(CustomExpiry.class))).thenAnswer(new Answer<RegionFactory>(){
@Override public RegionFactory answer(InvocationOnMock invocation) throws Throwable {
CustomExpiry customEntryTimeToLive = (CustomExpiry) invocation.getArguments()[0];
attributesFactory.setCustomEntryTimeToLive(customEntryTimeToLive);
return regionFactory;
}
});