South plays in 6C. West leads the S9.
Declarer wins the first 10 tricks - 3 clubs, 3 spades, 3 hearts and a heart ruff. At trick 11, he leads a diamond from Dummy.
At the point that Declarer ruffed the 4th round of hearts in Dummy, East should deduce the ending, with Declarer holding 2 diamonds and a club (trump). So if he ducks the diamond, he will still win the DA later. Declarer is now on a guess if he holds DKJ.
In general, without any other indication about who holds the DA and DQ, Declarer will finesse the DJ. This is because RHO will never, ever, play the DQ if he holds it, but will sometimes play the DA. Or RHO may hesitate with the DA, but not with the DQ.
This situation occurs quite often, and it is essential to work out in advance that one must duck smoothly when holding the A.
(If one has not counted Declarer's hand, another indication that he does not have a singleton DK is that he did not lead a diamond early in the hand. With a singleton DK, he will almost certainly lead towards the DK early in the hand, before the defenders can count his hand).