M2M tests. Not quite complete yet.