@@ -0,0 +1,2499 @@
+/*%0A * Copyright 2017 The Apache Software Foundation.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.apache.fontbox.cff;%0A%0Aimport static org.junit.jupiter.api.Assertions.assertEquals;%0Aimport static org.junit.jupiter.api.Assertions.assertFalse;%0Aimport static org.junit.jupiter.api.Assertions.assertNotNull;%0Aimport static org.junit.jupiter.api.Assertions.assertTrue;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Paths;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport org.apache.fontbox.util.BoundingBox;%0Aimport org.junit.jupiter.api.BeforeAll;%0Aimport org.junit.jupiter.api.Test;%0A%0Aclass CFFEncodingTest%0A%7B%0A    @Test%0A    void testCFFExpertEncoding()%0A    %7B%0A        CFFExpertEncoding cffExpertEncoding = CFFExpertEncoding.getInstance();%0A        // check some randomly chosen mappings%0A        assertEquals(%22.notdef%22, cffExpertEncoding.getName(0));%0A        assertEquals(%22space%22, cffExpertEncoding.getName(32));%0A        assertEquals(%22Psmall%22, cffExpertEncoding.getName(112));%0A        assertEquals(%22Ucircumflexsmall%22, cffExpertEncoding.getName(251));%0A        assertEquals(32, cffExpertEncoding.getCode(%22space%22));%0A        assertEquals(112, cffExpertEncoding.getCode(%22Psmall%22));%0A        assertEquals(251, cffExpertEncoding.getCode(%22Ucircumflexsmall%22));%0A    %7D%0A%0A    @Test%0A    void testCFFStandardEncoding()%0A    %7B%0A        CFFStandardEncoding cffStandardEncoding = CFFStandardEncoding.getInstance();%0A        // check some randomly chosen mappings%0A        assertEquals(%22.notdef%22, cffStandardEncoding.getName(0));%0A        assertEquals(%22space%22, cffStandardEncoding.getName(32));%0A        assertEquals(%22p%22, cffStandardEncoding.getName(112));%0A        assertEquals(%22germandbls%22, cffStandardEncoding.getName(251));%0A        assertEquals(32, cffStandardEncoding.getCode(%22space%22));%0A        assertEquals(112, cffStandardEncoding.getCode(%22p%22));%0A        assertEquals(251, cffStandardEncoding.getCode(%22germandbls%22));%0A    %7D%0A%0A%7D%0A

add some simple tests