@Test
public void testGetNextAvailableNameSecond() throws Exception {

    String name = "foo";
    PowerMockito.spy(Util.class);
    PowerMockito.doReturn(true).when(Util.class, "doesSurveyExist", null, name + "-2");
    PowerMockito.doReturn(false).when(Util.class, "doesSurveyExist", null, name + "-3");
    String next = Util.getNextAvailableName(null, name);
    Assert.assertEquals("foo-3", next);
}