@Test
public void updateHandlesWithNewPrefix() throws Exception {

    context.turnOffAuthorisationSystem();
    String newPrefix = "987654321";
    handleDAO.updateHandlesWithNewPrefix(context, newPrefix, HANDLE_PREFIX);
    context.commit();
    assertEquals(newPrefix + "/" + SUFFIX_1, itemService.find(context, item1.getID()).getHandle());
    assertEquals(newPrefix + "/" + SUFFIX_2, itemService.find(context, item2.getID()).getHandle());
    assertEquals(newPrefix + "/" + SUFFIX_3, itemService.find(context, item3.getID()).getHandle());
    //Ensure that records not matching the old prefix are not touched
    assertEquals("hdl:custom-prefix/" + SUFFIX_4, itemService.find(context, item4.getID()).getHandle());
    context.restoreAuthSystemState();
}