 
 class Tests: XCTestCase {
 
-	var collectionView: CenteredCollectionView!
+	var collectionView: UICollectionView!
+	var centeredCollectionViewFlowLayout: CenteredCollectionViewFlowLayout!
 	let expectedItemDimension: CGFloat = 80
 	let expectedLineSpacing: CGFloat = 20
 	let expectedFrameDimension: CGFloat = 300

				height: expectedFrameDimension
			)
		)
		collectionView.itemSize = CGSize(width: expectedItemDimension, height: expectedItemDimension)
		collectionView.minimumLineSpacing = expectedLineSpacing
	}

	override func tearDown() {
		// Put teardown code here. This method is called after the invocation of each test method in the class.
		collectionView = nil
		super.tearDown()
	}

	func testDefaultValuesNoFrame() {
		let expectedItemDimension: CGFloat = 50
		let expectedLineSpacing: CGFloat = 10
		collectionView = CenteredCollectionView()
		collectionView.flowLayout.invalidateLayout()
		// public
		XCTAssertEqual(collectionView.scrollDirection, .horizontal)
		XCTAssertEqual(collectionView.itemSize, CGSize(width: expectedItemDimension, height: expectedItemDimension))
		XCTAssertEqual(collectionView.minimumLineSpacing, expectedLineSpacing)
		XCTAssertEqual(collectionView.contentOffset.y, 0)
		XCTAssertEqual(collectionView.contentOffset.x, 25)
		// internal
		XCTAssertEqual(collectionView.pageWidth, expectedItemDimension + expectedLineSpacing)
		XCTAssertEqual(collectionView.currentContentOffset, 0)
	}

	func testDefaultValuesWithFrame() {
		// public
		collectionView.flowLayout.invalidateLayout()
		XCTAssertEqual(collectionView.scrollDirection, .horizontal)
		XCTAssertEqual(collectionView.itemSize, CGSize(width: expectedItemDimension, height: expectedItemDimension))
		XCTAssertEqual(collectionView.minimumLineSpacing, expectedLineSpacing)
		XCTAssertEqual(collectionView.contentOffset.y, 0)
		XCTAssertEqual(collectionView.contentOffset.x, -(expectedFrameDimension - expectedItemDimension) / 2)
		// internal
		XCTAssertEqual(collectionView.pageWidth, expectedItemDimension + expectedLineSpacing)
		XCTAssertEqual(collectionView.currentContentOffset, 0)
	}
}

	override func setUp() {
		super.setUp()
		// This method is called before the invocation of each test method in the class.
		let (collectionView, centeredCollectionViewFlowLayout) = UICollectionView.centeredCollectionView(
			frame: CGRect(
				x: 0,
				y: 0,
