OK, I was able to find a solution that works although I am interested to see if anyone has a better solution. What I came up with was:
public function testLockTimeExceptionThrows()
{
$request = $this->getLicensePurchaseRequest();
$limiter = new RateLimiter(Cache::driver());
$this->swap(RateLimiter::class, $limiter);
$lock = Mockery::mock(Lock::class);
$lock->shouldReceive('block')->once()->andThrow(new LockTimeoutException());
$lock->shouldNotReceive('release');
Cache::shouldReceive('lock')->andReturn($lock);
$this->actingAs($this->user)->postJson("/api/{$this->account->getKey()}/license", $request)
->assertStatus(500);
}
I ended up not needing to test the DB facade so i was able to take that out.