@@ -0,0 +1,2738 @@
+package client;%0A%0A/*%0A * Copyright (c) 2009-2019. Authors: see NOTICE file.%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 */%0A%0Aimport be.cytomine.client.CytomineException;%0Aimport be.cytomine.client.collections.Collection;%0Aimport be.cytomine.client.models.AbstractImage;%0Aimport be.cytomine.client.models.UploadedFile;%0Aimport org.apache.log4j.Logger;%0Aimport org.junit.jupiter.api.BeforeAll;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport java.util.ArrayList;%0A%0Aimport static org.junit.jupiter.api.Assertions.assertEquals;%0A%0Apublic class AbstractImageTests %7B%0A%0A    private static final Logger log = Logger.getLogger(AbstractImageTests.class);%0A%0A    @BeforeAll%0A    static void init() throws CytomineException %7B%0A        Utils.connect();%0A    %7D%0A%0A    @Test%0A    void testCreateAbstractImage() throws CytomineException %7B%0A        log.info(%22test create abstract_image%22);%0A        String name = Utils.getRandomString();%0A        AbstractImage ai = new AbstractImage(name, %22image/tiff%22).save();%0A        assertEquals(%22image/tiff%22, ai.getStr(%22mime%22), %22mime not the same used for the abstract_image creation%22);%0A%0A        ai = new AbstractImage().fetch(ai.getId());%0A        assertEquals(%22image/tiff%22, ai.getStr(%22mime%22), %22fetched mime not the same used for the abstract_image creation%22);%0A%0A        /* TODO permissions%0A        ai.set(%22width%22, 1000);%0A        ai.update();%0A        assertEquals(1000, (int)ai.getInt(%22width%22), %22Not the same width used for the abstract_image update%22);%0A%0A        ai.delete();%0A        try %7B%0A            new AbstractImage().fetch(ai.getId());%0A            assert false;%0A        %7D catch (CytomineException e) %7B%0A            assertEquals(e.getHttpCode(), 404);%0A        %7D*/%0A    %7D%0A%0A    @Test%0A    void testCreateAbstractImageIncorrect() throws CytomineException %7B%0A        log.info(%22test create incorrect abstract_image%22);%0A%0A        try %7B%0A            new AbstractImage().save();%0A            assert false;%0A        %7D catch (CytomineException e) %7B%0A            assertEquals(400, e.getHttpCode());%0A        %7D%0A    %7D%0A%0A    @Test%0A    void testListAbstractImages() throws CytomineException %7B%0A        log.info(%22test list abstract_images%22);%0A        Collection%3CAbstractImage%3E c = Collection.fetch(AbstractImage.class);%0A%0A        log.info(c.size());%0A    %7D%0A%0A%7D%0A

add abstract image tests