@Test
public void shouldThrowOnSuccessHttpResponsesThatAreNotOk() throws Exception {

  httpResponseBuilder =
      new HttpResponseBuilder().setStatusCode(HttpStatusCodes.STATUS_CODE_NO_CONTENT);
  KeysDownloader instance = newInstanceForTests();
  try {
    instance.download();
    fail();
  } catch (IOException expected) {
    assertEquals(
        "Unexpected status code = " + HttpStatusCodes.STATUS_CODE_NO_CONTENT,
        expected.getMessage());
  }
}