This will set defaults on a DummyApi instance if it was passed in. Perhaps we should make a larger ``if (opts.api instanceof DummyApi)`` block?