import org.springframework.http.HttpStatus;
@ExtendWith(MockitoExtension.class)
-public class ReadinessControllerTest {
+class ReadinessControllerTest {
@Mock
private CmpServersConfig cmpServersConfig;
@Test
- public void shouldReturnStatusOkWhenConfigIsReady() {
+ void shouldReturnStatusOkWhenConfigIsReady() {
// Given
Mockito.when(cmpServersConfig.isReady()).thenReturn(true);
// Then
assertThat(new ReadinessController(cmpServersConfig).checkReady().getStatusCode()).isEqualTo(HttpStatus.OK);
- ;
}
@Test
- public void shouldReturnStatusServiceUnavailableWhenConfigIsNotReady() {
+ void shouldReturnStatusServiceUnavailableWhenConfigIsNotReady() {
// Given
Mockito.when(cmpServersConfig.isReady()).thenReturn(false);
// Then
assertThat(new ReadinessController(cmpServersConfig).checkReady().getStatusCode()).isEqualTo(HttpStatus.SERVICE_UNAVAILABLE);
- ;
}
}
import static org.assertj.core.api.Assertions.assertThat;
import static org.onap.oom.certservice.certification.TestUtils.createCsrModel;
-public class X509CertificateBuilderTest {
+class X509CertificateBuilderTest {
private X509CertificateBuilder certificateBuilder;
}
@Test
- public void shouldReportThatSystemEnvOuVariableIsNotPresentWhenItWasNotDefined() {
+ void shouldReportThatSystemEnvOuVariableIsNotPresentWhenItWasNotDefined() {
// when
final Optional<String> testEnv = envsForCsr.getOrganizationUnit();
}
@Test
- public void shouldReportThatSystemEnvSansVariableIsNotPresentWhenItWasNotDefined() {
+ void shouldReportThatSystemEnvSansVariableIsNotPresentWhenItWasNotDefined() {
// when
final Optional<String> testEnv = envsForCsr.getSubjectAlternativesName();