class VariableTable {

    public Variable acquireExtra(Class<?> type) {
        Validate.notNull(type);
        
        return acquireExtra(Type.getType(type));
    }

}

class VariableTableTest {

    private ClassNode classNode;
    private MethodNode methodNode;

    @Test
    public void mustBeAbleToAcquireExtraVariable() {

        VariableTable fixture = new VariableTable(classNode, methodNode);
        
        Variable var1 = fixture.acquireExtra(Type.LONG_TYPE);
        assertEquals(var1.getType(), Type.LONG_TYPE);
        assertEquals(var1.getIndex(), 1);
        assertTrue(var1.isUsed());
        
        Variable var2 = fixture.acquireExtra(Type.BOOLEAN_TYPE);
        assertEquals(var2.getType(), Type.BOOLEAN_TYPE);
        assertEquals(var2.getIndex(), 3);
        assertTrue(var2.isUsed());
    }

}