@Test
public void testGetResourceAndPartitionNum() {

  assertEquals(new ImmutablePair("$terrapin$data$file_set$1343443323", 100),
      TerrapinUtil.getResourceAndPartitionNum("$terrapin$data$file_set$1343443323$100"));
  assertEquals(new ImmutablePair("$terrapin$data$file_set$1343443323", 100),
      TerrapinUtil.getResourceAndPartitionNum("$terrapin$data$file_set$1343443323_100"));
  // Invalid partition number.
  Assert.assertNull(
      TerrapinUtil.getResourceAndPartitionNum("$terrapin$data$file_set$1343443323_1r0"));
  Assert.assertNull(
      TerrapinUtil.getResourceAndPartitionNum("$terrapin$data$file_set$1343443323$1r0"));
  // Invalid separator - neither $ nor _ are present.
  Assert.assertNull(TerrapinUtil.getResourceAndPartitionNum("WrongPartition"));
}