@startuml
state CdPlayer {
  [*] --> Top
  state Top {
    [*] --> NotBroken
    state NotBroken {
      [*] --> Empty
      state Stopped {
      }
      state Open {
      }
      state Empty {
      }
      state Playing {
      }
      state Paused {
      }
    }
    state Broken {
    }
  }
}
  Top --> Broken : HAMMER
      Stopped --> Playing : PLAY
      Stopped --> Open : OPEN_CLOSE
      Stopped --> Open : STOP
      Open --> Empty : OPEN_CLOSE
      Empty --> Open : OPEN_CLOSE
      Empty --> Stopped : CD_DETECTED
      Playing --> Stopped : STOP
      Playing --> Paused : PAUSE
      Playing --> Open : OPEN_CLOSE
      Paused --> Stopped : STOP
      Paused --> Playing : PLAY
      Paused --> Open : OPEN_CLOSE
@enduml
