use of org.sonar.api.utils.Durations in project sonarqube by SonarSource.
the class NotificationFactoryTest method readField.
private static Durations readField(NewIssuesNotification notification, String fieldName) {
try {
Field durationsField = NewIssuesNotification.class.getDeclaredField(fieldName);
durationsField.setAccessible(true);
Object o = durationsField.get(notification);
return (Durations) o;
} catch (IllegalAccessException | NoSuchFieldException e) {
throw new RuntimeException(e);
}
}