First thing is, try not to worry, it's only natural to panic about being able to quote your texts in a closed book exam but you have to remember that the examiners are not expecting you to be able to recite the entire text off by heart – otherwise you’d have no room to write anything else! The key is to be able to remember your text in enough detail to be able to paraphrase the important events that occur in the text. You’ll then want to study some of the key or more famous passages in the text in more detail in order to be able to quote these passages as close to word for word as possible, as these are the passages examiners will expect you to know in more detail. In addition, it’s helpful to memorise a few quotes that can be used to illustrate multiple themes and it can be useful to draw a spider-diagram analysing how your chosen quote explains each of these themes.