@Test(expected = IOException.class) public void testPrepareConfigFilesThrowsExceptionWhenUnzipFailed() throws IOException { doThrow(IOException.class) .when(archiverService) .unzip(Mockito.<InputStream>any(), Mockito.anyBoolean()); yarnConfigFilesProvider.prepareConfigFiles(); }
@Test(expected = IOException.class) public void testPrepareConfigFilesThrowsExceptionWithWrongBase64FileContent() throws IOException { when(yarnVcapServiceReader.getConfigZipFiles()).thenReturn(inCorrectBase64FilesContent); yarnConfigFilesProvider.prepareConfigFiles(); }
@Test public void testPrepareConfigFilesSuccess() throws IOException { yarnConfigFilesProvider.prepareConfigFiles(); }