  @Test(
      expectedExceptions = InfrastructureException.class,
      expectedExceptionsMessageRegExp = "Invalid response.*")
  public void shouldThrowInfrastructureExceptionWhenResponseFailsToValidate() throws Exception {

    // Given
    String jsonResponse = generateBadResponse(ROUTE_PREFIX, NAMESPACE, NAMESPACE_TYPE_CHE, false);
    when(httpJsonResponse.asString()).thenReturn(jsonResponse);
    TenantDataCacheKey cacheKey = new TenantDataCacheKey("token", "che");

    // When
    cacheLoader.load(cacheKey);
  }