use of com.sequenceiq.cloudbreak.domain.SecurityRule in project cloudbreak by hortonworks.
the class SecurityGroupRequestToSecurityGroupConverterTest method testConvert.
@Test
public void testConvert() {
// GIVEN
given(conversionService.convert(any(Object.class), any(TypeDescriptor.class), any(TypeDescriptor.class))).willReturn(Sets.newConcurrentHashSet(Collections.singletonList(new SecurityRule())));
// WHEN
SecurityGroup result = underTest.convert(getRequest("security-group/security-group.json"));
// THEN
assertAllFieldsNotNull(result, Arrays.asList("id", "owner", "account", "securityGroupId"));
}
use of com.sequenceiq.cloudbreak.domain.SecurityRule in project cloudbreak by hortonworks.
the class SecurityRuleRequestToSecurityRuleConverterTest method testConvert.
@Test
public void testConvert() {
SecurityRule result = underTest.convert(createRequest("80,22,9443,1-65535"));
assertAllFieldsNotNull(result, Collections.singletonList("securityGroup"));
}
Aggregations