def METHOD_NAME(self):
    # Create a prompt that exceed max context length: 51 * 41 = 2091 tokens
    long_prompt: str = TEST_PROMPT * 41
    assert not self.window_service.fits_within_context_window(long_prompt)
    # Truncate and ensure it fits within the context window
    truncated_long_prompt: str = self.window_service.truncate_from_right(long_prompt)
    assert self.window_service.get_num_tokens(truncated_long_prompt) == self.window_service.max_request_length
    assert self.window_service.fits_within_context_window(truncated_long_prompt)