@Test
public void retrieveDictionary() throws Exception {

    // when
    final InputStream dictionary = given()
            .when() //
            .expect()
            .statusCode(200)
            .log()
            .ifError() //
            .get("/api/transform/dictionary")
            .asInputStream();
    // then
    final ObjectInputStream ois = new ObjectInputStream(new GZIPInputStream(dictionary));
    final Object object = ois.readObject();
    Assert.assertEquals(TdqCategories.class, object.getClass());
    final TdqCategories serviceDictionary = (TdqCategories) object;
    final Directory dictionaryDirectory = serviceDictionary.getDictionary().asDirectory(); // Test Lucene directory
                                                                                           // creation.
    assertNotNull(dictionaryDirectory);
    final Directory keywordDirectory = serviceDictionary.getKeyword().asDirectory(); // Test Lucene directory
                                                                                     // creation.
    assertNotNull(keywordDirectory);
}