public void testExecute() {
Set<String> runList = ImmutableSet.of("role[" + prefix + "]");
try {
api.createNode(Node.builder().name(prefix).runList(runList).environment("_default").build());
strategy.execute(prefix);
Node node = api.getNode(prefix);
assertEquals(node.getName(), prefix);
assertEquals(node.getRunList(), runList);
assertEquals(node.getAutomaticAttributes().get("current_user").toString(), currentUserProvider.get().toString());
} finally {
api.deleteNode(prefix);
}
}