001/* 002 * acme4j - Java ACME client 003 * 004 * Copyright (C) 2023 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 org.junit.jupiter.api.Test; 019 020/** 021 * Unit tests for {@link AcmeNotSupportedException}. 022 */ 023public class AcmeNotSupportedExceptionTest { 024 025 @Test 026 public void testAcmeNotSupportedException() { 027 var msg = "revoke"; 028 var ex = new AcmeNotSupportedException(msg); 029 assertThat(ex).isInstanceOf(RuntimeException.class); 030 assertThat(ex.getMessage()).isEqualTo("Server does not support revoke"); 031 assertThat(ex.getCause()).isNull(); 032 } 033 034}