@Test
public void testAllOptions() throws Exception {
ServiceFactory factory = mock(ServiceFactory.class);
Service service = mock(Service.class);
when(factory.create((String) any())).thenReturn(service);
NodeMetadata node1 = new NodeMetadataBuilder().name("name1").ids("id1")
.location(new LocationBuilder().scope(LocationScope.PROVIDER)
.id("location-id1").description("location-desc1").build())
.imageId("image-id").state(NodeState.RUNNING)
.publicAddresses(Lists.newArrayList("100.0.0.1"))
.privateAddresses(Lists.newArrayList("10.0.0.1")).build();
NodeMetadata node2 = new NodeMetadataBuilder().name("name2").ids("id2")
.location(new LocationBuilder().scope(LocationScope.PROVIDER)
.id("location-id2").description("location-desc2").build())
.imageId("image-id").state(NodeState.RUNNING)
.publicAddresses(Lists.newArrayList("100.0.0.2"))
.privateAddresses(Lists.newArrayList("10.0.0.2")).build();
when(service.getNodes((ClusterSpec) any())).thenReturn(
(Set) Sets.newLinkedHashSet(Lists.newArrayList(node1, node2)));
ListClusterCommand command = new ListClusterCommand(factory);
Map<String, File> keys = KeyPair.generateTemporaryFiles();