@Test
public void testSelectVOIObjectShouldReturnSecondFrameWhenAskedFor() {

    DicomObject frameVoiLut1 = createWindowCenterObject();
    DicomObject frameVoiLut2 = createWindowCenterObject();
    DicomObject obj = new BasicDicomObject();
    DicomElement frameGroupSequence = obj.putSequence(Tag.PerFrameFunctionalGroupsSequence);
    addFrame(frameGroupSequence, frameVoiLut1);
    addFrame(frameGroupSequence, frameVoiLut2);
    assertSame(frameVoiLut2, VOIUtils.selectVoiObject(obj, null, 2));
}