### Question:
PathBuilderFactory { @SuppressWarnings("unchecked") public <T> PathBuilder<T> create(Class<T> type) { PathBuilder<T> rv = (PathBuilder<T>) paths.get(type); if (rv == null) { rv = new PathBuilder<T>(type, variableName(type)); paths.put(type, rv); } return rv; } PathBuilderFactory();  PathBuilderFactory(String suffix); @SuppressWarnings("unchecked") PathBuilder<T> create(Class<T> type);  }### Answer:
@Test public void create() { PathBuilderFactory factory = new PathBuilderFactory(""); PathBuilder<Object> pathBuilder = factory.create(Object.class); assertEquals("object", pathBuilder.toString()); assertEquals(Object.class, pathBuilder.getType()); pathBuilder.get("prop", Object.class); pathBuilder.get("prop", String.class); pathBuilder.get("prop", Object.class); }
@Test public void create_withSuffix() { PathBuilderFactory factory = new PathBuilderFactory("_"); PathBuilder<Object> pathBuilder = factory.create(Object.class); assertEquals("object_", pathBuilder.toString()); assertEquals(Object.class, pathBuilder.getType()); pathBuilder.get("prop", Object.class); pathBuilder.get("prop", String.class); pathBuilder.get("prop", Object.class); }