verify(mockGeneratorContext).commitResource(testLogger, mockOutputStream);
}
public void testOutputCssMapArtifactWithTestData() throws UnableToCompleteException {
UnitTestTreeLogger testLogger = new UnitTestTreeLogger.Builder().createLogger();
ResourceContext mockResourceContext = mock(ResourceContext.class);
JMethod mockJMethod1 = mock(JMethod.class);
JMethod mockJMethod2 = mock(JMethod.class);
JMethod mockJMethod3 = mock(JMethod.class);
JClassType mockJClassType1 = mock(JClassType.class);
JClassType mockJClassType2 = mock(JClassType.class);
JClassType mockJClassType3 = mock(JClassType.class);
Map<JMethod, String> testMap = new LinkedHashMap<JMethod, String>();
testMap.put(mockJMethod1, "TESTCSSNAME1");
testMap.put(mockJMethod2, "TESTCSSNAME2");
testMap.put(mockJMethod3, "TESTCSSNAME3");
ByteArrayOutputStream testOutputStream = new ByteArrayOutputStream();
GeneratorContext mockGeneratorContext = mock(GeneratorContext.class);
GeneratedResource mockGeneratedResource = mock(GeneratedResource.class);
when(mockResourceContext.getGeneratorContext()).thenReturn(mockGeneratorContext);
when(mockGeneratorContext.tryCreateResource(
testLogger, "cssResource/com.test.Bundle.cssMethod.cssmap")).thenReturn(testOutputStream);
when(mockJMethod1.getEnclosingType()).thenReturn(mockJClassType1);
when(mockJClassType1.getQualifiedSourceName()).thenReturn("test.class.type.1");
when(mockJMethod1.getName()).thenReturn("basename1");