@Test
	public void testCheckOut() throws Exception {

		checkHelper.deleteCheckOut(b.getIsbn(), 1, 2);
		bh.deleteBook(-2);

		bh.addBook(b);

		// Nothing should be added to the list of checkouts since the book is null
		checkHelper.checkOut(null, start, 1, 2);
		CheckOut co = checkHelper.getCorrespondingCheckOut(b.getIsbn(), 1);
		Boolean absent = true;
		if(co != null){
			absent = false;
		}
		assertTrue(absent == true);


		checkHelper.checkOut(b, start, 1, 2);
		co = checkHelper.getCorrespondingCheckOut(b.getIsbn(), 1);
		long oneDay = 1 * 24 * 60 * 60 * 1000;
		Boolean present = false;
		if(co != null){

			Timestamp start = new Timestamp(co.getStart().getTime());
			Timestamp end = new Timestamp(co.getEnd().getTime());			

			if(co.getIsbn() == -2 && co.getCardNumber() == 1 && co.getIdNumber() == 2 && end.getTime() - start.getTime() == 7 * oneDay){
				present = true;
			}
		}
		assertTrue(present == true);

		//Delete checkout and books to keep the database clean
		checkHelper.deleteCheckOut(b.getIsbn(), 1, 2);
		bh.deleteBook(-2);
	}