I had to make the other classes public in order to get rid of the public interfaces, which seem to exist purely to allow the tests to assert the types of the commands. I guess there was no CommandFactory test for creating a VersionCommand which is why the compiler didn't complain here.