AzureBlobMetadata extends RemoteBlobMetadata { public static RemoteSegmentArchiveEntry toIndexEntry(Map<String, String> metadata, int length) { Map<String, String> caseInsensitiveMetadata = CaseInsensitiveKeysMapAccess.convert(metadata); return RemoteBlobMetadata.toIndexEntry(caseInsensitiveMetadata, length); }  static RemoteSegmentArchiveEntry toIndexEntry(Map<String, String> metadata, int length); static boolean isSegment(Map<String, String> metadata);  }
@Test public void toIndexEntry_caseInsensitive() { HashMap<String, String> metadata = new HashMap<>(); metadata.put(RemoteBlobMetadata.METADATA_SEGMENT_UUID.toUpperCase(), "97290085-b1a5-4fb9-ae77-db6d13177537"); metadata.put(RemoteBlobMetadata.METADATA_SEGMENT_POSITION.toUpperCase(), "3"); metadata.put(RemoteBlobMetadata.METADATA_SEGMENT_GENERATION.toUpperCase(), "50"); metadata.put(RemoteBlobMetadata.METADATA_SEGMENT_FULL_GENERATION.toUpperCase(), "60"); metadata.put(RemoteBlobMetadata.METADATA_SEGMENT_COMPACTED.toUpperCase(), "true"); RemoteSegmentArchiveEntry azureSegmentArchiveEntry = AzureBlobMetadata.toIndexEntry(metadata, 5); assertEquals(-7554506325726244935L, azureSegmentArchiveEntry.getMsb()); assertEquals(-5874985927363300041L, azureSegmentArchiveEntry.getLsb()); assertEquals(3, azureSegmentArchiveEntry.getPosition()); assertEquals(5, azureSegmentArchiveEntry.getLength()); assertEquals(50, azureSegmentArchiveEntry.getGeneration()); assertEquals(60, azureSegmentArchiveEntry.getFullGeneration()); assertTrue(azureSegmentArchiveEntry.isCompacted()); }