@Test
public void testDetermineDimension() throws Exception {

  // Setup tracks
  VideoStreamImpl videoStream = new VideoStreamImpl("test1");
  videoStream.setFrameWidth(80);
  videoStream.setFrameHeight(30);
  VideoStreamImpl videoStream2 = new VideoStreamImpl("test2");
  videoStream2.setFrameWidth(101);
  videoStream2.setFrameHeight(50);
  TrackImpl videoTrack = new TrackImpl();
  videoTrack.setURI(URI.create("/test"));
  videoTrack.setVideo(Collections.list((VideoStream) videoStream));
  TrackImpl videoTrack2 = new TrackImpl();
  videoTrack2.setURI(URI.create("/test"));
  videoTrack2.setVideo(Collections.list((VideoStream) videoStream2));
  List<Track> tracks = Collections.list((Track) videoTrack, (Track) videoTrack2);
  EncodingProfileImpl encodingProfile = new EncodingProfileImpl();
  encodingProfile.setIdentifier("test");
  ComposerService composerService = EasyMock.createMock(ComposerService.class);
  EasyMock.expect(
          composerService.concat(encodingProfile.getIdentifier(), Dimension.dimension(101, 50), false,
                  tracks.toArray(new Track[tracks.size()]))).andReturn(null).once();
  EasyMock.expect(
          composerService.concat(encodingProfile.getIdentifier(), Dimension.dimension(100, 50), false,
                  tracks.toArray(new Track[tracks.size()]))).andReturn(null).once();
  EasyMock.replay(composerService);
  PartialImportWorkflowOperationHandler handler = new PartialImportWorkflowOperationHandler();
  handler.setComposerService(composerService);
  handler.startConcatJob(encodingProfile, tracks, -1.0F, false);
  handler.startConcatJob(encodingProfile, tracks, -1.0F, true);
}