public Map<Integer, Slice> toKeyMap(List<OrcType> types, List<HiveColumnHandle> physicalColumnHandles)
    {
        Map<String, Integer> columnIndexMap = physicalColumnHandles.stream()
                .collect(toImmutableMap(HiveColumnHandle::getName, HiveColumnHandle::getHiveColumnIndex));
        return toKeyMap(types, columnIndexMap);
    }
@Test(expectedExceptions = PrestoException.class)
    public void testInvalidKeyMap()
    {
        DwrfEncryptionMetadata dwrfEncryptionMetadata = new DwrfEncryptionMetadata(ImmutableMap.of("c1", "abcd".getBytes()), ImmutableMap.of(), "test_algo", "test_provider");

        List<HiveColumnHandle> columnHandleList = ImmutableList.of(
                new HiveColumnHandle("column1", HIVE_INT, TypeSignature.parseTypeSignature(BIGINT), 0, HiveColumnHandle.ColumnType.REGULAR, Optional.empty(), Optional.empty()));

        List<OrcType> orcTypes = ImmutableList.of(
                new OrcType(OrcType.OrcTypeKind.STRUCT, ImmutableList.of(1), ImmutableList.of("column1"), Optional.empty(), Optional.empty(), Optional.empty()),
                new OrcType(OrcType.OrcTypeKind.INT, ImmutableList.of(), ImmutableList.of(), Optional.empty(), Optional.empty(), Optional.empty()));
        dwrfEncryptionMetadata.toKeyMap(orcTypes, columnHandleList);
    }