class AnswerMetadataUtil {

  public static @Nonnull AnswerMetadata computeAnswerMetadata(
      @Nonnull Answer answer, @Nonnull BatfishLogger logger) {
    try {
      return AnswerMetadata.builder()
          .setMetrics(computeMetrics(answer, logger))
          .setStatus(answer.getStatus())
          .build();
    } catch (Exception e) {
      return AnswerMetadata.forStatus(AnswerStatus.FAILURE);
    }
  }

  private  AnswerMetadataUtil();

}