- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {ArrayList a =
new ArrayList<String>()
new ArrayList()
new ArrayList<Object>()
- Smart code suggestions by Codota
}
@Test(expected = LocalizableValidationException.class) public void testClusteringTaskServiceValidateStateOnStartNegative() throws Throwable { long containersNumberBeforeProvisioning = getExistingContainersInAdapter().size(); assertEquals(0, containersNumberBeforeProvisioning); request = startRequest(request); RequestBrokerState initialState = waitForRequestToComplete(request); long containersNumberBeforeClustering = getExistingContainersInAdapter().size(); // Number of containers before provisioning. assertEquals(3, containersNumberBeforeClustering); ClusteringTaskState clusteringState = new ClusteringTaskState(); clusteringState.resourceCount = -2; clusteringState.resourceDescriptionLink = initialState.resourceDescriptionLink; clusteringState.resourceType = ResourceType.CONTAINER_TYPE.getName(); try { doPost(clusteringState, ClusteringTaskService.FACTORY_LINK); } catch (LocalizableValidationException e) { if (e.getMessage().contains("'resourceCount' must be greater than 0.")) { throw e; } } fail("Should fail with: 'resourceCount' must be greater than 0."); }
private void createContainerClusteringTasks(RequestBrokerState state) { ClusteringTaskState clusteringState = new ClusteringTaskState(); clusteringState.resourceCount = state.actualResourceCount; clusteringState.postAllocation = isPostAllocationOperation(state);