public function distinct_until_changed_some_changes()
{
$xs = $this->createHotObservable([onNext(150, 1), onNext(210, 2), onNext(215, 3), onNext(220, 3), onNext(225, 2), onNext(230, 2), onNext(230, 1), onNext(240, 2), onCompleted(250)]);
$results = $this->scheduler->startWithCreate(function () use($xs) {
return $xs->distinctUntilChanged();
});
$messages = $results->getMessages();
$this->assertEquals(6, count($messages));
$this->assertTrue($messages[0]->getValue() instanceof OnNextNotification);
$this->assertTrue($messages[0]->getValue() == new OnNextNotification(2));
$this->assertEquals(210, $messages[0]->getTime());
$this->assertTrue($messages[1]->getValue() instanceof OnNextNotification);
$this->assertTrue($messages[1]->getValue() == new OnNextNotification(3));
$this->assertEquals(215, $messages[1]->getTime());
$this->assertTrue($messages[2]->getValue() instanceof OnNextNotification);
$this->assertTrue($messages[2]->getValue() == new OnNextNotification(2));
$this->assertEquals(225, $messages[2]->getTime());
$this->assertTrue($messages[3]->getValue() instanceof OnNextNotification);
$this->assertTrue($messages[3]->getValue() == new OnNextNotification(1));
$this->assertEquals(230, $messages[3]->getTime());
$this->assertTrue($messages[4]->getValue() instanceof OnNextNotification);
$this->assertTrue($messages[4]->getValue() == new OnNextNotification(2));
$this->assertEquals(240, $messages[4]->getTime());
$this->assertTrue($messages[5]->getValue() instanceof OnCompletedNotification);
$this->assertEquals(250, $messages[5]->getTime());
}