@SuppressWarnings("unchecked")
@Test
public void runAuthWithDataTest() throws Exception {
ControllerTester tester = new ControllerTester();
HttpSession session = tester.request.getSession(true);
session.setAttribute("token", authSubToken);
String[] kinds = new String[] { "TestKind1" };
final SpreadsheetEntry spreadsheet = SpreadsheetUtil.createSpreadsheet(authSubToken, kinds);
try {
String run = tester.start("/restore/index");
assertNotNull(run);
List<Map<String, Object>> list = (List) tester.request.getAttribute("list");
assertThat(list.size(), not(0));
} finally {
SpreadsheetUtil.deleteSpreadsheet(authSubToken, spreadsheet);