MockServices.cordaService - corda

corda / net.corda.testing.node / MockServices / cordaService

# cordaService

`open fun <T : SerializeAsToken> cordaService(type: Class<T>): T`

Return the singleton instance of the given Corda service type. This is a class that is annotated with CordaService and will have automatically been registered by the node.

### Exceptions

`IllegalArgumentException` - If type is not annotated with CordaService or if the instance is not found.