(22a) Samantha was expecting a phone call.
(22b) Was Samantha expecting a phone call?
(23a) He has been cheating on his wife again.
(23b) Has he been cheating on his wife again?
(24a) The senator could retire after the current session.
(24b) Could the senator retire after the current session?
(25a) That talented writer is a drunken sot.
(25b) Is that talented writer a drunken sot?
If we think of questions as being formed from the equivalent statement, we can see that yes-no questions are formed by moving the italicized verb from one side of the subject to the other. The verbs that move are either auxiliary verbs or a form of the verb to be.
We can use this fact of English grammar as a test for our subjects. Simply turn the clause into a yes-no question (or if it's already a question, change it to a statement) and observe the position of the moving verb. This technique will work even when the subject is very long and contains many elements inside it:
(26a) The man who walked barefoot for ten miles across the burning-hot desert is thirsty.
(26b) Is the man who walked barefoot for ten miles across the burning-hot desert thirsty?
Sometimes the statement form of a sentence doesn't have an auxiliary verb. In this case, a dummy verb, a form of the verb to do, is inserted:
(27a) Bob thinks he is a good musician.
(27b) Does Bob think he is a good musician?
Although it may seem that this process violates the general pattern, there is an alternate form that we can use when we want to emphasize a point, perhaps when responding to someone else's assertion that Bob is not confident in his musical abilities:
(27c) Bob does think he is a good musician.
So even here, we can apply our subject-finding test, by contrasting the yes-no question with the emphatic form rather than the plain statement.
Once we have identified the subject, the rest of the clause is the predicate.
 The technical term for the verb that moves is the operator.
 There are some sentences (other than questions), where the ordinary order of subject and verb is inverted (e.g., "From his workshop have come many outstanding paintings.") In such cases, this test becomes a little more complicated. Turning this into a question will require significant reordering ("Have many outstanding paintings come from his workshop?") Notice, though, that the question form forces the actual subject ("many outstanding paintings") back to its default position, and we can then turn this question back into a statement that uses the more ordinary word order ("Many outstanding paintings have come from his workshop.")