@Test
public void testGetAttributeNamesWithValues() {

  RepositoryBackedSession rbs = new RepositoryBackedSession(sessionData, manager, factory);
  rbs.setAttribute("Test", "value");
  rbs.setAttribute("TestChanged", "valueOriginal");
  rbs.setAttribute("TestChanged", "valueFinal");
  rbs.setAttribute("TestToDelete", "value");
  rbs.removeAttribute("TestToDelete");
  List<String> list = rbs.getAttributeNamesWithValues();
  assertThat(list, hasItems("Test", "TestChanged"));
  assertThat(list, not(hasItems("TestToDelete")));
}