@Test(expected = IllegalArgumentException.class)
public void testRollbackFileSetWithInvalidVersion() throws Exception {

  ZooKeeperManager mockZKManager = mock(ZooKeeperManager.class);
  FileSetInfo fileSetInfo = new FileSetInfo();
  fileSetInfo.numVersionsToKeep = 4;
  fileSetInfo.oldServingInfoList = ImmutableList.of(
      new FileSetInfo.ServingInfo("/hdfs/path/1", "resource", 1000, PartitionerType.MODULUS),
      new FileSetInfo.ServingInfo("/hdfs/path/2", "resource", 1000, PartitionerType.MODULUS),
      new FileSetInfo.ServingInfo("/hdfs/path/3", "resource", 1000, PartitionerType.MODULUS)
  );
  fileSetInfo.servingInfo =
      new FileSetInfo.ServingInfo("/hdfs/path/4", "resource", 1000, PartitionerType.MODULUS);
  String fileSet = "test_fileset";
  when(mockZKManager.getFileSetInfo(eq(fileSet))).thenReturn(fileSetInfo);
  doNothing().when(mockZKManager).setFileSetInfo(anyString(), any(FileSetInfo.class));
  TerrapinAdmin.rollbackFileSet(mockZKManager, fileSet, fileSetInfo, 3);
}