@Override public void setUpResources() throws Exception { spec = new VirtualNetworkCreateSpec(); spec.setName("virtualNetworkName"); spec.setDescription("virtualNetworkDescription"); spec.setRoutingType(RoutingType.ROUTED); spec.setSize(VirtualNetworkCreateSpec.DEFAULT_MIN_NETWORK_SIZE); spec.setReservedStaticIpSize(2); addResource(new ProjectNetworksResource(frontendClient, paginationConfig)); }
@Test public void failsToCreateWithInvalidSpec() throws Throwable { spec.setName(" bad name"); assertThat(createNetwork().getStatus(), is(400)); }