### Question:
DefaultToolchain implements Toolchain, ToolchainPrivate { @Override public final String getType() { return type != null ? type : model.getType(); } protected  DefaultToolchain( ToolchainModel model, Logger logger ); protected  DefaultToolchain( ToolchainModel model, String type, Logger logger ); @Override final String getType(); @Override final ToolchainModel getModel(); final void addProvideToken( String type, RequirementMatcher matcher ); @Override boolean matchesRequirements( Map<String, String> requirements ); @Override boolean equals( Object obj ); @Override int hashCode(); @Override String toString(); static final String KEY_TYPE; }### Answer:
@Test public void testGetType() { ToolchainModel model = new ToolchainModel(); DefaultToolchain toolchain = newDefaultToolchain( model, "TYPE" ); assertEquals( "TYPE", toolchain.getType() ); model.setType( "MODEL_TYPE" ); toolchain = newDefaultToolchain( model ); assertEquals( "MODEL_TYPE", toolchain.getType() ); }