@Test
	public void RWRandomCarNumberTest() throws Exception {
		ArrayList<UnilabsCar> in_buf = new ArrayList<UnilabsCar>();
		ByteArrayOutputStream out = new ByteArrayOutputStream();
		ByteArrayInputStream in;
		UnilabsCar[] buf = new UnilabsCar[new Random().nextInt(50)];
		Writer w = new SimpleWriter(out);
		Reader r;
		for(int i = 0 ; i < buf.length ; i++)
			buf[i] = generateCar();
		for(UnilabsCar c : buf) {
			w.writeCar(c);
		}
		in = new ByteArrayInputStream(out.toByteArray());
		r = new SimpleReader(in);
		try {
			while(true) {
				in_buf.add(r.readCar());
			}
		} catch (EOFException e) {

		}
		assertEquals(in_buf.size(), buf.length);
		for(int i = 0 ; i < buf.length ; i++) {
			assertTrue(in_buf.get(i).equals(buf[i]));
		}
	}