public void create(int nodes, int expectedShortcuts) {
        if (nodeCount >= 0)
            throw new IllegalStateException("CHStorage can only be created once");
        if (nodes < 0)
            throw new IllegalStateException("CHStorage must be created with a positive number of nodes");
        nodesCH.create((long) nodes * nodeCHEntryBytes);
        nodeCount = nodes;
        for (int node = 0; node < nodes; node++)
            setLastShortcut(toNodePointer(node), -1);
        shortcuts.create((long) expectedShortcuts * shortcutEntryBytes);
    }
@Test
    public void testLargeNodeA() {
        int nodeA = Integer.MAX_VALUE;
        RAMIntDataAccess access = new RAMIntDataAccess("", "", false, -1);
        access.create(1000);
        access.setInt(0, nodeA << 1 | 1 & PrepareEncoder.getScFwdDir());
        assertTrue(access.getInt(0) < 0);
        assertEquals(Integer.MAX_VALUE, access.getInt(0) >>> 1);
    }