@Test
public void findAllByTemplate() {

    MenuSession vasyaSes = apiInstance.getMenuFactory().createSingleSession(vasya, randomTemplate);
    sessionResolver.addNewSession(vasyaSes);
    MenuSession petyaSes = apiInstance.getMenuFactory().createSingleSession(petya, randomTemplate);
    sessionResolver.addNewSession(petyaSes);
    Collection<MenuSession> allByTemplate = sessionResolver.findAllByTemplate(randomTemplate);
    assertEquals(allByTemplate.size(), 2);
    assertTrue(allByTemplate.contains(vasyaSes));
    assertTrue(allByTemplate.contains(petyaSes));
}