@@ -0,0 +1,1055 @@
+package com.bzu.softwareconstruction.segments;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport org.junit.Test;%0A%0Aimport com.bzu.softwareconstruction.services.multipart.exceptions.InvalidItemURL;%0A%0Apublic class SegmentPartUrlTest %7B%0A%0A%09@Test%0A%09public void testIsSegmentTrue() %7B%0A%0A%09%09SegmentPartUrl segment = new SegmentPartUrl(%22http://151.80.134.50/data/text_test.segments%22);%0A%09%09assertEquals(true, segment.isSegment());%0A%09%7D%0A%0A%09@Test%0A%09public void testIsSegmentFalse() %7B%0A%0A%09%09SegmentPartUrl segment = new SegmentPartUrl(%22http://151.80.134.50/data/text.txt-segment1%22);%0A%09%09assertEquals(false, segment.isSegment());%0A%09%7D%0A%0A%09@Test(expected = InvalidItemURL.class)%0A%09public void openStreamBadUrl() %7B%0A%09%09SegmentPartUrl segment = new SegmentPartUrl(%22http://151.80.134.50/data/text.txt-badrurl%22);%0A%09%09segment.openStream();%0A%09%7D%0A%0A%09@Test %0A%09public void openStreamGoodUrl() %7B%0A%09%09SegmentPartUrl segment = new SegmentPartUrl(%22http://151.80.134.50/data/text.txt-segment1%22);%0A%09%09assertEquals(%22sun.net.www.protocol.http.HttpURLConnection$HttpInputStream%22, segment.openStream().getClass().getName());%0A%09%7D%0A%7D%0A

add test cases for testing segmentPartUrl