### Question:
BlockState { @Override public String toString() { StringJoiner sj = new StringJoiner(","); for (Entry<String, String> e : getProperties().entrySet()){ sj.add(e.getKey() + "=" + e.getValue()); } return getFullId() + "[" + sj.toString() + "]"; } BlockState(String id);  BlockState(String id, Map<String, String> properties); private  BlockState(BlockState blockState, String withKey, String withValue); String getNamespace(); String getId(); String getFullId(); Map<String, String> getProperties(); BlockState with(String property, String value); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static BlockState fromString(String serializedBlockState); static final BlockState AIR; static final BlockState MISSING; }### Answer:
@Test public void testToString() { BlockState blockState = new BlockState("someblock"); assertEquals("minecraft:someblock[]", blockState.toString()); blockState = blockState.with("testProp", "testVal"); assertEquals("minecraft:someblock[testProp=testVal]", blockState.toString()); blockState = blockState.with("testProp2", "testVal2"); String toString = blockState.toString(); assertTrue( toString.equals("minecraft:someblock[testProp=testVal,testProp2=testVal2]") || toString.equals("minecraft:someblock[testProp2=testVal2,testProp=testVal]") ); }