@Test(groups = { "unit" })
public class UpdateAutomaticAttributesOnNodeImplTest {
@Test
public void test() {
ChefApi chef = createMock(ChefApi.class);
Map<String, JsonBall> automatic = ImmutableMap.<String, JsonBall> of();
Supplier<Map<String, JsonBall>> automaticSupplier = Suppliers.<Map<String, JsonBall>> ofInstance(automatic);
Node node = Node.builder().name("name").environment("_default").build();
Node nodeWithAutomatic = Node.builder().name("name").environment("_default").automaticAttributes(automatic)
.build();
expect(chef.getNode("name")).andReturn(node);
expect(chef.updateNode(nodeWithAutomatic)).andReturn(null);
replay(chef);
UpdateAutomaticAttributesOnNodeImpl updater = new UpdateAutomaticAttributesOnNodeImpl(chef, automaticSupplier);