// Path: src/main/java/br/com/six2six/fixturefactory/base/Range.java
// public class Range {
// 
// 	private Number start;
// 	
// 	private Number end;
// 
// 	public Range(Number start, Number end) {
// 		if (start.doubleValue() >= end.doubleValue()) {
// 			throw new IllegalArgumentException(String.format("incorrect range: [%d, %d]", start, end));
// 		}
// 		
// 		this.start = start;
// 		this.end = end;
// 	}
// 
// 	public Number getStart() {
// 		return start;
// 	}
// 
// 	public Number getEnd() {
// 		return end;
// 	}
// 	
// }


import br.com.six2six.fixturefactory.base.Range;
import br.com.six2six.fixturefactory.function.AtomicFunction;
package br.com.six2six.fixturefactory.function.impl;


public class CnpjFunction implements AtomicFunction {

	private boolean formatted;
	
	public CnpjFunction() { }
	
	public CnpjFunction(boolean formatted) {
		this.formatted = formatted;
	}
	
	@Override
	@SuppressWarnings("unchecked")
	public <T> T generateValue() {
// Path: src/main/java/br/com/six2six/fixturefactory/base/Range.java
// public class Range {
// 
// 	private Number start;
// 	
// 	private Number end;
// 
// 	public Range(Number start, Number end) {
// 		if (start.doubleValue() >= end.doubleValue()) {
// 			throw new IllegalArgumentException(String.format("incorrect range: [%d, %d]", start, end));
// 		}
// 		
// 		this.start = start;
// 		this.end = end;
// 	}
// 
// 	public Number getStart() {
// 		return start;
// 	}
// 
// 	public Number getEnd() {
// 		return end;
// 	}
// 	
// }


// Path: src/main/java/br/com/six2six/fixturefactory/function/impl/CnpjFunction.java
import br.com.six2six.fixturefactory.base.Range;
import br.com.six2six.fixturefactory.function.AtomicFunction;

package br.com.six2six.fixturefactory.function.impl;


public class CnpjFunction implements AtomicFunction {

	private boolean formatted;
	
	public CnpjFunction() { }
	
	public CnpjFunction(boolean formatted) {
		this.formatted = formatted;
	}
	
	@Override
	@SuppressWarnings("unchecked")
	public <T> T generateValue() {
		RandomFunction random = new RandomFunction(Integer.class, new Range(1, 9));