Skip to content

Instantly share code, notes, and snippets.

Created October 3, 2014 21:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
package com.github.jangalinski;
import org.assertj.core.api.Assertions;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.enterprise.inject.Instance;
import javax.enterprise.inject.New;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.Random;
import static org.assertj.core.api.Assertions.assertThat;
public class _26177485Test {
public static class A {
private int number = new Random().nextInt();
public static class B {
private Instance<A> aInstance;
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private final Weld weld = new Weld();
private B b;
public void _() {
for (int i = 0; i<10; i++) {"{}", b.aInstance.get().number);
public void setUp() {
final WeldContainer container = weld.initialize();
b = container.instance().select(B.class).get();
public void tearDown() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment