'In the case of identical notes, one should be dropped.
This is an edge case because in most cases, the same pitch should not sound
twice at the same time on one instrument.'

def testApplySustainControlChangesWithIdenticalNotes(self):

    sequence = copy.copy(self.note_sequence)
    testing_lib.add_control_changes_to_sequence(sequence, 0, [(1.0, 64, 127), (4.0, 64, 0)])
    expected_sequence = copy.copy(sequence)
    testing_lib.add_track_to_sequence(sequence, 0, [(60, 100, 2.0, 2.5), (60, 100, 2.0, 2.5)])
    testing_lib.add_track_to_sequence(expected_sequence, 0, [(60, 100, 2.0, 4.0)])
    sus_sequence = sequences_lib.apply_sustain_control_changes(sequence)
    self.assertProtoEquals(expected_sequence, sus_sequence)
