001/*
002 * acme4j - Java ACME client
003 *
004 * Copyright (C) 2016 Richard "Shred" Körber
005 *   http://acme4j.shredzone.org
006 *
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
013 */
014package org.shredzone.acme4j.exception;
015
016import static org.assertj.core.api.Assertions.assertThat;
017
018import java.io.IOException;
019
020import org.junit.jupiter.api.Test;
021
022/**
023 * Unit tests for {@link AcmeNetworkException}.
024 */
025public class AcmeNetworkExceptionTest {
026
027    @Test
028    public void testAcmeNetworkException() {
029        var cause = new IOException("Network not reachable");
030
031        var ex = new AcmeNetworkException(cause);
032
033        assertThat(ex.getMessage()).isNotNull();
034        assertThat(ex.getCause()).isEqualTo(cause);
035    }
036
037}