if (!turnoutStatuses.containsKey(turnoutId)) {
turnoutStatuses.put(turnoutId, STRAIGHT);
}
if (pollingEnabled) {
Turnout turnout = new Turnout(turnoutId);
<BUG>sendCommandWithContent(GET_TURNOUT_STATUS, turnout, sender);
</BUG>
}
TurnoutStatus status = turnoutStatuses.get(turnoutId);
return status == STRAIGHT;

if (!turnoutStatuses.containsKey(turnoutId)) {
turnoutStatuses.put(turnoutId, STRAIGHT);
}
if (pollingEnabled) {
Turnout turnout = new Turnout(turnoutId);
sendCommandWithContent(GET_TURNOUT_STATUS, turnout, mqtt);
}
TurnoutStatus status = turnoutStatuses.get(turnoutId);
return status == STRAIGHT;
