com.r3corda.core.testing / TestLedgerDSLInterpreter / retrieveOutputStateAndRef

# retrieveOutputStateAndRef

`fun <S : ContractState> retrieveOutputStateAndRef(clazz: Class<S>, label: String): StateAndRef<S>`
Overrides OutputStateLookup.retrieveOutputStateAndRef

Retrieves an output previously defined by TransactionDSLInterpreter._output with a label passed in.

### Parameters

`clazz` - The class object holding the type of the output state expected.
`label` - The label of the to-be-retrieved output state.

Return
The output StateAndRef.