/**
* Tests creation of task.
*/
public void testCreationTask()
{
URLInputStream stream = new URLInputStream(getTestURL());
long time = System.currentTimeMillis();
NetTask task = new NetTask("A", "B", stream);
long startTime = task.getStartTime().getTime();
assertEquals("B", task.getFeed());
assertNull(task.getParent());
assertEquals(-1, (int)task.getProgress());
assertEquals(-1, task.getSize());
assertTrue(stream.getSourceURL() == task.getSourceURL());
assertTrue(startTime >= time && startTime <= time + 20);
assertEquals(NetTask.STATUS_CONNECTING, task.getStatus());
assertEquals("A", task.getTitle());
assertEquals("A", task.toString());