Added test to set segments and poll sensor. More test cleanup.