Wrote some tests to check cred access logic
First bug found using tests!