}
@Test
public void testStoreAndLoadEvents_WithUpcaster() throws SQLException {
assertNotNull(testSubject);
UpcasterChain mockUpcasterChain = mock(UpcasterChain.class);
when(mockUpcasterChain.upcast(isA(SerializedObject.class), isA(UpcastingContext.class)))
.thenAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
SerializedObject serializedObject = (SerializedObject) invocation.getArguments()[0];
return Arrays.asList(serializedObject, serializedObject);