class IpsecSessionStatusAnswerer extends Answerer {

  @VisibleForTesting
  static Row toRow(@Nonnull IpsecSessionInfo info) {
    RowBuilder row = Row.builder();
    row.put(COL_INITIATOR, new Node(info.getInitiatorHostname()))
        .put(
            COL_INIT_INTERFACE,
            NodeInterfacePair.of(
                info.getInitiatorHostname(), String.format("%s", info.getInitiatorInterface())))
        .put(COL_INIT_IP, info.getInitiatorIp())
        .put(
            COL_RESPONDER,
            info.getResponderHostname() == null ? null : new Node(info.getResponderHostname()))
        .put(
            COL_RESPONDER_INTERFACE,
            info.getResponderHostname() != null && info.getResponderInterface() != null
                ? NodeInterfacePair.of(
                    info.getResponderHostname(), String.format("%s", info.getResponderInterface()))
                : null)
        .put(COL_RESPONDER_IP, info.getResponderIp())
        .put(
            COL_TUNNEL_INTERFACES,
            info.getInitiatorTunnelInterface() == null && info.getResponderTunnelInterface() == null
                ? NOT_APPLICABLE
                : String.format(
                    "%s -> %s",
                    firstNonNull(info.getInitiatorTunnelInterface(), "Missing Initiator"),
                    firstNonNull(info.getResponderTunnelInterface(), "Missing Responder")))
        .put(COL_STATUS, info.getIpsecSessionStatus());
    return row.build();
  }

    IpsecSessionStatusAnswerer(Question question, IBatfish batfish);

}