If the operation needs to have some state, then perhaps it would be better to use a regular class. OTOH, you might be able to use the same key/initial value/final value for all your operations, like we do in TestWriteOperation.