Specter stubs a subset of the cgminer client protocol. It allows you to test your programs against a dummy server.