/** * @throws Exception If failed. */ @Test public void testSerialization() throws Exception { Map<String, IgfsMode> pathModes = new HashMap<>(); pathModes.put("path1", PRIMARY); pathModes.put("path2", PROXY); IgfsAttributes attrs = new IgfsAttributes("testIgfsName", 513000, 888, "meta", "data", DUAL_SYNC, pathModes, true); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutput os = new ObjectOutputStream(bos); os.writeObject(attrs); os.close(); IgfsAttributes deserializedAttrs = (IgfsAttributes)new ObjectInputStream( new ByteArrayInputStream(bos.toByteArray())).readObject(); assertTrue(eq(attrs, deserializedAttrs)); }
attrVals.add(new IgfsAttributes( igfsCfg.getName(), igfsCfg.getBlockSize(),
attrVals.add(new IgfsAttributes( igfsCfg.getName(), igfsCfg.getBlockSize(),