Testing with DFAs