extend AA::Dependency behavior

& add tests for existing behavior!

I originally wrote this for #3247, but I like the added interfaces too
much to just throw them away.