com.r3corda.contracts.testing / fillWithSomeTestCash

# fillWithSomeTestCash

`fun ServiceHub.fillWithSomeTestCash(howMuch: Amount<Currency>, outputNotary: Party = DUMMY_NOTARY, atLeastThisManyStates: Int = 3, atMostThisManyStates: Int = 10, rng: Random = Random(), ref: OpaqueBytes = OpaqueBytes(ByteArray(1, { 1 })), ownedBy: PublicKey? = null, issuedBy: PartyAndReference = DUMMY_CASH_ISSUER, issuerKey: KeyPair = DUMMY_CASH_ISSUER_KEY): Vault`

Creates a random set of between (by default) 3 and 10 cash states that add up to the given amount and adds them to the vault. This is intended for unit tests. The cash is issued by DUMMY_CASH_ISSUER and owned by the legal identity key from the storage service.

The service hub needs to provide at least a key management service and a storage service.

### Parameters

`outputNotary` - the notary to use for output states. The transaction is NOT signed by this notary.

Return
a vault object that represents the generated states (it will NOT be the full vault from the service hub).