    @Test
    public void testDecode() {

        try {
            FileInputStream in = null;
            in = new FileInputStream(f);
            Map m = new BDecoder(in).bdecode().getMap();

            BEValue val = (BEValue) m.get("minId");
            if (val == null) {
                throw new InvalidBEncodingException("minId");
            }
            assertEquals(minId, val.getNumber().intValue());

            val = (BEValue) m.get("maxId");
            if (val == null) {
                throw new InvalidBEncodingException("maxId");
            }
            assertEquals(maxId, val.getNumber().intValue());
            
            val = (BEValue) m.get("name");
            if (val == null) {
                throw new InvalidBEncodingException("name");
            }
            assertEquals(name, val.getString());
        } catch (InvalidBEncodingException ex) {
            Logger.getLogger(BDecoderTest.class.getName()).log(Level.SEVERE, null, ex);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(BDecoderTest.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(BDecoderTest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }