@Test
    public void testGetCouriers()throws Exception{

        List<Courier> couriers = connection.getCouriers();
        //total Couriers returned
        assertEquals("It should return total couriers", 8, couriers.size());
        //check first courier
        Assert.assertEquals("First courier slug", firstCourierAccount.get("slug"), couriers.get(0).getSlug());
        Assert.assertEquals("First courier name", firstCourierAccount.get("name"), couriers.get(0).getName());
        Assert.assertEquals("First courier phone", firstCourierAccount.get("phone"), couriers.get(0).getPhone());
        Assert.assertEquals("First courier other_name", firstCourierAccount.get("other_name"), couriers.get(0).getOther_name());
        Assert.assertEquals("First courier web_url", firstCourierAccount.get("web_url"), couriers.get(0).getWeb_url());

        //try to acces with a bad API Key
        ConnectionAPI connectionBadKey = new ConnectionAPI("badKey");

        try{
            connectionBadKey.getCouriers();
        }catch (AftershipAPIException e){
            Assert.assertEquals("{\"meta\":{\"code\":401,\"message\":\"Invalid API key.\",\"type\":\"Unauthorized\"},\"data\":{}}", e.getMessage());
        }

    }