@Test(expected = SonarMetricsNotFoundException.class)
public void should_throw_exception_if_sonar_metrics_are_not_found() throws Exception {

    Object call = genericSoftwareClient.resource(anyString(), any(Class.class));
    when(call).thenThrow(new ResourceNotFoundException("not found"));
    sonarClient.findMetrics();
}