@Test
public void getLastPaginatedSession() {

    PaginatedMenuTemplate paginatedMenuTemplate = apiInstance.templateBuilder().paginatedTemplate()
            .setMainPage(randomTemplate)
            .withPage(randomTemplate)
            .withPage(veryRandomTemplate)
            .build();
    PaginatedMenuSession paginatedSession = apiInstance.getMenuFactory().createPaginatedSession(vasya, paginatedMenuTemplate);
    Optional<PaginatedMenuSession> lastPaginatedSession = sessionResolver.getLastPaginatedSession(vasya);
    assertTrue(lastPaginatedSession.isPresent());
    assertEquals(lastPaginatedSession.get(), paginatedSession);
}