Which version of OCMock are you using? Mocking class methods is supported since 2.1.
Apart from that, this works for me:
id testConnection = [OCMockObject mockForClass:[MyURLConnection class]];
[[[testConnection stub] andReturn:nil] sendSynchronousRequest:nil
returningResponse:nil
error:NULL];
STAssertNil([MyURLConnection sendSynchronousRequest:nil returningResponse:nil error:NULL], nil);