public IndexConfig setType(IndexType type) {
        this.type = checkNotNull(type, "Index type cannot be null.");

        return this;
    }
@Test(expected = NullPointerException.class)
    public void testTypeNull() {
        new IndexConfig().setType(null);
    }