Track trackMock = EasyMock.createMock(Track.class);
FileOrCDTrack fileTrackMock = EasyMock.createMock(FileOrCDTrack.class);
EasyMock.expect(trackMock.isFileOrCDTrack()).andReturn(true);
EasyMock.expect(trackMock.getFileOrCDTrack()).andReturn(fileTrackMock);
EasyMock.expect(fileTrackMock.getFile()).andReturn(fileMock);
ITagFactory factoryMock = EasyMock.createMock(ITagFactory.class);
EasyMock.expect(factoryMock.getTag((File) fileMock)).andReturn(null);
EasyMock.replay(fileMock, factoryMock, trackMock, fileTrackMock);
ID3TagFactory.setInstance(factoryMock);
ID3TagFactory.getID3Tag(trackMock);