@Test
	public void testAddBook() {
		Set<StockBook> booksToAdd = new HashSet<StockBook>();
		Integer testISBN = 100;
		booksToAdd.add(new ImmutableStockBook(testISBN,
				"*@#&)%rdrrdjtIHH%^#)$&N 37874\n \t",
				"eurgqo	89274267^&#@&$%@&%$( \t", (float) 100, 5, 0, 0, 0,
				false));

		List<StockBook> listBooks = null;
		try {
			storeManager.addBooks(booksToAdd);
			listBooks = storeManager.getBooks();
		} catch (BookStoreException e) {
			e.printStackTrace();
			fail();
		}

		Boolean containsTestISBN = false;
		Iterator<StockBook> it = listBooks.iterator();
		while (it.hasNext()) {
			Book b = it.next();
			if (b.getISBN() == testISBN)
				containsTestISBN = true;
		}
		assertTrue("List should contain the book added!", containsTestISBN);

		Boolean exceptionThrown = false;
		booksToAdd.add(new ImmutableStockBook(-1, "BookName", "Author",
				(float) 100, 5, 0, 0, 0, false));

		try {
			storeManager.addBooks(booksToAdd);
		} catch (BookStoreException e) {
			exceptionThrown = true;
		}
		assertTrue("Invlaid ISBN exception should be thrown!", exceptionThrown);
		List<StockBook> currentList = null;
		try {
			currentList = storeManager.getBooks();
			assertTrue(currentList.equals(listBooks));
		} catch (BookStoreException e) {
			e.printStackTrace();
			fail();
		}

		exceptionThrown = false;
		booksToAdd.add(new ImmutableStockBook(testISBN + 1, "BookName",
				"Author", (float) 100, 0, 0, 0, 0, false));

		try {
			storeManager.addBooks(booksToAdd);
		} catch (BookStoreException e) {
			exceptionThrown = true;
		}
		assertTrue("Invalid number of copies exception should be thrown!",
				exceptionThrown);
		try {
			currentList = storeManager.getBooks();
			assertTrue(currentList.equals(listBooks));
		} catch (BookStoreException e) {
			e.printStackTrace();
			fail();
		}

		exceptionThrown = false;
		booksToAdd.add(new ImmutableStockBook(testISBN + 2, "BookName",
				"Author", (float) -100, 0, 0, 0, 0, false));

		try {
			storeManager.addBooks(booksToAdd);
		} catch (BookStoreException e) {
			exceptionThrown = true;
		}
		assertTrue("Invlaid price exception should be thrown!", exceptionThrown);
		try {
			currentList = storeManager.getBooks();
			assertTrue(currentList.equals(listBooks));
		} catch (BookStoreException e) {
			e.printStackTrace();
			fail();
		}

	}