def METHOD_NAME(self):
    o = pnl.TransferMechanism()
    m = pnl.ContrastiveHebbianMechanism(
            input_size=2, hidden_size=0, target_size=2,
            mode=pnl.SIMPLE_HEBBIAN,
            separated=False,
            matrix=[[0,-.5],[-.5,0]]
    )
    regexp = r"Learning cannot be enabled for .* because it has no LearningMechanism"
    with pytest.warns(UserWarning, match=regexp):
        m.learning_enabled = True
    m.configure_learning()
    m.reset_stateful_function_when=pnl.Never()
    c = pnl.Composition()
    c.add_linear_processing_pathway([m,o])
    c.scheduler.add_condition(o, pnl.WhenFinished(m))
    c.learn(inputs={m:[2,2]}, num_trials=4)
    results = c.parameters.results.get(c)
    np.testing.assert_allclose(results, [[[2.671875]],
                                         [[2.84093837]],
                                         [[3.0510183]],
                                         [[3.35234623]]])