I'm intrigued with the possibility of a mock object library for D, but selfmock seems to be in a halfway working state. There are a bunch of imports to a exception module that doesn't exist, as well as a missing select_call import.