### Question:
DynamoDBConvertedObjectPersister extends DynamoDBObjectPersister<T> { @Override public T retrieve(String identifier) { S persistentObject = getDynamoDBMapper().load(converter.getPersistentObjectClass(), identifier); return converter.getDataObject(persistentObject); } DynamoDBConvertedObjectPersister(String tableName,
        String persistenceKeyFieldName, AWSDynamoDBFactory AWSDynamoDBFactory, Class<T> dataObjectClass, PersistentObjectConverter<T, S> converter, TableIndexes tableIndexes); @Override T retrieve(String identifier); @Override T persist(T object); @Override T update(T object); void setStoredObjectRetrieverFactory(DynamoObjectRetrieverFactory<S> storedObjectRetrieverFactory);  }### Answer:
@Test(expectedExceptions = PersistenceException.class) public void testQueryException() throws PersistenceException { persister.setDynamoDBMapper(dbMapper); Mockito.doReturn(PersistentMyTest.class).when(mockPersistentObjectConverter).getPersistentObjectClass(); Mockito.when(dbMapper.queryPage(Mockito.eq(PersistentMyTest.class), Mockito.any())).thenThrow(new AmazonDynamoDBException("bad params")); DataObjectFeed<MyTest> returnedFeed = persister.retrieve(Collections.singletonList(new Query<>("id","xyz"))); }