@Test
public void testVersionWithServerError() throws Exception {
startDefaultMaster();
// If master returns with an error, we should still get the correct client version, and a
// nice error message instead of master version. Specify bogus path to make this happen.
final VersionResponse version =
getVersion("version", "--json", "-z", masterEndpoint() + "/badPath");
assertEquals("wrong client version", POM_VERSION, version.getClientVersion());
assertEquals("wrong master version", "Master replied with error code 404",
version.getMasterVersion());
}