test_class.file: beanmother-core/src/test/java/io/beanmother/core/common/FixtureMapTest.java
test_class.identifier: FixtureMapTest
test_case.body: @Test
      public void testReproduce() {
          FixtureMap origin = new FixtureMap();
          FixtureMap subMap = new FixtureMap();
          FixtureList list = new FixtureList();
          FixtureMap mapInList = new FixtureMap();
  
          FixtureValue integer = new FixtureValue(1);
          FixtureValue date = new FixtureValue(new Date());
          list.add(mapInList);
          origin.put("subMap", subMap);
          origin.put("list", list);
          origin.put("integer", integer);
          origin.put("date", date);
  
          origin.setFixtureName("origin-fixture-name");
          origin.setRoot(true);
  
          FixtureMap dup = origin.reproduce();
  
          assertEquals(origin, dup);
          assertEquals(origin.get("subMap"), dup.get("subMap"));
          assertEquals(origin.get("list"), dup.get("list"));
          assertEquals(dup.get("integer"), integer);
          assertEquals(origin.get("date"), dup.get("date"));
  
          assertFalse(dup == origin);
          assertFalse(dup.get("subMap") == subMap);
          assertFalse(dup.get("list") == list);
          assertFalse(((FixtureList)dup.get("list")).get(0) == mapInList);
          assertFalse(dup.get("integer") == integer);
          assertFalse(dup.get("date") == date);
      }
test_case.class_method_signature: FixtureMapTest.testReproduce()
test_case.full_signature: @Test public void testReproduce()
test_case.identifier: testReproduce
test_case.invocations: add put put put put setFixtureName setRoot reproduce assertEquals assertEquals get get assertEquals get get assertEquals get assertEquals get get assertFalse assertFalse get assertFalse get assertFalse get get assertFalse get assertFalse get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReproduce()
focal_class.declarator: metadata
focal_class.modifier: private
focal_class.original_string: private FixtureMetadata metadata;
focal_class.type: FixtureMetadata
focal_class.var_name: metadata
focal_class.file: beanmother-core/src/main/java/io/beanmother/core/common/FixtureMap.java
focal_class.identifier: FixtureMap
focal_class.interfaces: implements FixtureTemplate
focal_class.class_method_signature: FixtureMap.FixtureMap()
focal_class.full_signature: public  FixtureMap()
focal_class.identifier: FixtureMap
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  FixtureMap()
focal_class.class_method_signature: FixtureMap.reproduce()
focal_class.full_signature: public FixtureMap reproduce()
focal_class.identifier: reproduce
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: FixtureMap
focal_class.signature: FixtureMap reproduce()
focal_class.class_method_signature: FixtureMap.getMetadata()
focal_class.full_signature: public FixtureMetadata getMetadata()
focal_class.identifier: getMetadata
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: FixtureMetadata
focal_class.signature: FixtureMetadata getMetadata()
focal_class.class_method_signature: FixtureMap.isRoot()
focal_class.full_signature: @Override public boolean isRoot()
focal_class.identifier: isRoot
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRoot()
focal_class.class_method_signature: FixtureMap.setRoot(boolean root)
focal_class.full_signature: @Override public void setRoot(boolean root)
focal_class.identifier: setRoot
focal_class.modifiers: @Override public
focal_class.parameters: (boolean root)
focal_class.return: void
focal_class.signature: void setRoot(boolean root)
focal_class.class_method_signature: FixtureMap.getFixtureName()
focal_class.full_signature: @Override public String getFixtureName()
focal_class.identifier: getFixtureName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getFixtureName()
focal_class.class_method_signature: FixtureMap.setFixtureName(String fixtureName)
focal_class.full_signature: @Override public void setFixtureName(String fixtureName)
focal_class.identifier: setFixtureName
focal_class.modifiers: @Override public
focal_class.parameters: (String fixtureName)
focal_class.return: void
focal_class.signature: void setFixtureName(String fixtureName)
focal_class.class_method_signature: FixtureMap.getParent()
focal_class.full_signature: @Override public FixtureTemplate getParent()
focal_class.identifier: getParent
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: FixtureTemplate
focal_class.signature: FixtureTemplate getParent()
focal_class.class_method_signature: FixtureMap.setParent(FixtureTemplate parent)
focal_class.full_signature: @Override public void setParent(FixtureTemplate parent)
focal_class.identifier: setParent
focal_class.modifiers: @Override public
focal_class.parameters: (FixtureTemplate parent)
focal_class.return: void
focal_class.signature: void setParent(FixtureTemplate parent)
focal_class.class_method_signature: FixtureMap.hasParent()
focal_class.full_signature: @Override public boolean hasParent()
focal_class.identifier: hasParent
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasParent()
focal_class.superclass: extends LinkedHashMap<String, FixtureTemplate>
focal_method.body: public FixtureMap reproduce() {
          try {
              ByteArrayOutputStream bos = new ByteArrayOutputStream(1024 * 2);
              ObjectOutputStream oos = new ObjectOutputStream(bos);
              oos.writeObject(this);
              oos.flush();
              oos.close();
  
              ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
              Object obj = ois.readObject();
              FixtureMap dup = (FixtureMap) obj;
  
              dup.setParent(getParent());
              dup.setRoot(isRoot());
              dup.setFixtureName(getFixtureName());
  
              return dup;
          } catch (Exception e) {
              throw new FixtureFormatException(getFixtureName(), e);
          }
      }
focal_method.class_method_signature: FixtureMap.reproduce()
focal_method.full_signature: public FixtureMap reproduce()
focal_method.identifier: reproduce
focal_method.invocations: writeObject flush close toByteArray readObject setParent getParent setRoot isRoot setFixtureName getFixtureName getFixtureName
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: FixtureMap
focal_method.signature: FixtureMap reproduce()