// Path: generators-core/src/main/java/io/generators/core/Generators.java
// public static <T> Generator<T> ofInstance(T instance) {
//     return new GeneratorOfInstance<>(instance);
// }


import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static io.generators.core.Generators.ofInstance;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
package io.generators.core;



public class TypeGeneratorTest {

    @Rule
    public ExpectedException expectedException = ExpectedException.none();
    private static final String MESSAGE = "Some message";

    static class AlwaysThrowsException {
        public AlwaysThrowsException(Integer i) {
            throw new IllegalArgumentException(MESSAGE);
        }
    }

    @Test
    public void shouldFailWhenTypeClassIsNull() {
        //Given
        expectedException.expect(NullPointerException.class);
        expectedException.expectMessage("typeClass");

        //When
        Class<WholeAmount> typeClass = null;
// Path: generators-core/src/main/java/io/generators/core/Generators.java
// public static <T> Generator<T> ofInstance(T instance) {
//     return new GeneratorOfInstance<>(instance);
// }


// Path: generators-core/src/test/java/io/generators/core/TypeGeneratorTest.java
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static io.generators.core.Generators.ofInstance;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

package io.generators.core;



public class TypeGeneratorTest {

    @Rule
    public ExpectedException expectedException = ExpectedException.none();
    private static final String MESSAGE = "Some message";

    static class AlwaysThrowsException {
        public AlwaysThrowsException(Integer i) {
            throw new IllegalArgumentException(MESSAGE);
        }
    }

    @Test
    public void shouldFailWhenTypeClassIsNull() {
        //Given
        expectedException.expect(NullPointerException.class);
        expectedException.expectMessage("typeClass");

        //When
        Class<WholeAmount> typeClass = null;
        new TypeGenerator<>(typeClass, ofInstance(13));