@Override
  public String toString() {
    try {
      return JsonUtils.objectToString(unwrapIndexes());
    } catch (JsonProcessingException e) {
      return "Unserializable value due to " + e.getMessage();
    }
  }
@Test
  public void testToString()
      throws IOException {
    IndexType index1 = Mockito.mock(IndexType.class);
    Mockito.when(index1.getId()).thenReturn("index1");
    IndexConfig indexConf = new IndexConfig(false);
    FieldIndexConfigs fieldIndexConfigs = new FieldIndexConfigs.Builder()
        .add(index1, indexConf)
        .build();

    Assert.assertEquals(fieldIndexConfigs.toString(), "{\"index1\":"
        + JsonUtils.objectToString(indexConf) + "}");
  }