// Path: src/main/java/nl/vu/datalayer/hbase/exceptions/NonNumericalException.java
// public class NonNumericalException extends Exception {
// 
// 	public NonNumericalException() {
// 		super();
// 	}
// 
// 	public NonNumericalException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// 	public NonNumericalException(String message) {
// 		super(message);
// 	}
// 
// 	public NonNumericalException(Throwable cause) {
// 		super(cause);
// 	}
// 	
// }
// 
// Path: src/main/java/nl/vu/datalayer/hbase/exceptions/NumericalRangeException.java
// public class NumericalRangeException extends Exception {
// 
// 	private static final long serialVersionUID = 148584607226955296L;
// 
// 	public NumericalRangeException() {
// 		super();
// 	}
// 
// 	public NumericalRangeException(String message) {
// 		super(message);
// 	}
// 	
// }


import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import nl.vu.datalayer.hbase.exceptions.NonNumericalException;
import nl.vu.datalayer.hbase.exceptions.NumericalRangeException;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.openrdf.model.Literal;
import org.openrdf.model.Value;
import org.openrdf.model.ValueFactory;
import org.openrdf.model.impl.ValueFactoryImpl;
import org.openrdf.rio.ntriples.NTriplesUtil;
	@Test
	public void test_unsignedShort_negativeInput() {	
		String sNumber = "-1323";
		try {
			String toTest = "\""+sNumber+"\"^^<http://www.w3.org/2001/XMLSchema#unsignedShort>";
			Value object = NTriplesUtil.parseValue(toTest, valFact);
			TypedId id = TypedId.createNumerical((Literal)object);
			
			fail("NumericalRangeException not thrown for unsignedInt "+sNumber);
		} catch (NumericalRangeException e) {
			//let the test pass
		}
		catch (NonNumericalException e) {
			fail("NonNumericalException thrown for unsignedShort "+sNumber);
		}
	}
	
	@Test
	public void test_unsignedShort_aboveMax() {	
		String sNumber = "65536";
		try {
			String toTest = "\""+sNumber+"\"^^<http://www.w3.org/2001/XMLSchema#unsignedShort>";
			Value object = NTriplesUtil.parseValue(toTest, valFact);
			TypedId id = TypedId.createNumerical((Literal)object);
			
			fail("NumericalRangeException not thrown for unsignedShort "+sNumber);
		} catch (NumericalRangeException e) {
			//let the test pass
		}
		catch (NonNumericalException e) {
// Path: src/main/java/nl/vu/datalayer/hbase/exceptions/NonNumericalException.java
// public class NonNumericalException extends Exception {
// 
// 	public NonNumericalException() {
// 		super();
// 	}
// 
// 	public NonNumericalException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// 	public NonNumericalException(String message) {
// 		super(message);
// 	}
// 
// 	public NonNumericalException(Throwable cause) {
// 		super(cause);
// 	}
// 	
// }
// 
// Path: src/main/java/nl/vu/datalayer/hbase/exceptions/NumericalRangeException.java
// public class NumericalRangeException extends Exception {
// 
// 	private static final long serialVersionUID = 148584607226955296L;
// 
// 	public NumericalRangeException() {
// 		super();
// 	}
// 
// 	public NumericalRangeException(String message) {
// 		super(message);
// 	}
// 	
// }


// Path: src/test/java/nl/vu/datalayer/hbase/id/TypedIdTestNumericals.java
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import nl.vu.datalayer.hbase.exceptions.NonNumericalException;
import nl.vu.datalayer.hbase.exceptions.NumericalRangeException;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.openrdf.model.Literal;
import org.openrdf.model.Value;
import org.openrdf.model.ValueFactory;
import org.openrdf.model.impl.ValueFactoryImpl;
import org.openrdf.rio.ntriples.NTriplesUtil;

	@Test
	public void test_unsignedShort_negativeInput() {	
		String sNumber = "-1323";
		try {
			String toTest = "\""+sNumber+"\"^^<http://www.w3.org/2001/XMLSchema#unsignedShort>";
			Value object = NTriplesUtil.parseValue(toTest, valFact);
			TypedId id = TypedId.createNumerical((Literal)object);
			
			fail("NumericalRangeException not thrown for unsignedInt "+sNumber);
		} catch (NumericalRangeException e) {
			//let the test pass
		}
		catch (NonNumericalException e) {
			fail("NonNumericalException thrown for unsignedShort "+sNumber);
		}
	}
	
	@Test
	public void test_unsignedShort_aboveMax() {	
		String sNumber = "65536";
		try {
			String toTest = "\""+sNumber+"\"^^<http://www.w3.org/2001/XMLSchema#unsignedShort>";
			Value object = NTriplesUtil.parseValue(toTest, valFact);
			TypedId id = TypedId.createNumerical((Literal)object);
			
			fail("NumericalRangeException not thrown for unsignedShort "+sNumber);
		} catch (NumericalRangeException e) {
			//let the test pass
		}
		catch (NonNumericalException e) {
			fail("NonNumericalException thrown for unsignedShort "+sNumber);