@Test(expected = IllegalArgumentException.class) public void testTransformC32ToGreenCcd_Given_NoText_C32Xml_Throws_IllegalArgumentException() throws Throwable { C32ToGreenCcdTransformer c32ToGreenCcdTransformer = mock(C32ToGreenCcdTransformer.class); GreenCcdSerializer greenCcdSerializern = mock(GreenCcdSerializer.class); C32ParserImpl sut = new C32ParserImpl(c32ToGreenCcdTransformer, greenCcdSerializern); sut.ParseC32(" "); }
@Override public GreenCCD ParseC32(String c32xml) throws C32ParserException { Assert.hasText(c32xml); try { String greenCcdXml = c32ToGreenCcdTransformer .TransformC32ToGreenCcd(c32xml); GreenCCD greenCcdDto = greenCcdSerializer.Deserialize(greenCcdXml); return greenCcdDto; } catch (Exception ex) { String errorMessage = "Error occured when trying to parse C32"; logger.error(errorMessage, ex); throw new C32ParserException(errorMessage, ex); } }
C32ParserImpl implements C32Parser { @Override public GreenCCD ParseC32(String c32xml) throws C32ParserException { Assert.hasText(c32xml); try { String greenCcdXml = c32ToGreenCcdTransformer .TransformC32ToGreenCcd(c32xml); GreenCCD greenCcdDto = greenCcdSerializer.Deserialize(greenCcdXml); return greenCcdDto; } catch (Exception ex) { String errorMessage = "Error occured when trying to parse C32"; logger.error(errorMessage, ex); throw new C32ParserException(errorMessage, ex); } } }
C32ParserImpl implements C32Parser { @Override public GreenCCD ParseC32(String c32xml) throws C32ParserException { Assert.hasText(c32xml); try { String greenCcdXml = c32ToGreenCcdTransformer .TransformC32ToGreenCcd(c32xml); GreenCCD greenCcdDto = greenCcdSerializer.Deserialize(greenCcdXml); return greenCcdDto; } catch (Exception ex) { String errorMessage = "Error occured when trying to parse C32"; logger.error(errorMessage, ex); throw new C32ParserException(errorMessage, ex); } } C32ParserImpl();  C32ParserImpl(C32ToGreenCcdTransformer c32ToGreenCcdTransformer,
			GreenCcdSerializer greenCcdSerializer); }
C32ParserImpl implements C32Parser { @Override public GreenCCD ParseC32(String c32xml) throws C32ParserException { Assert.hasText(c32xml); try { String greenCcdXml = c32ToGreenCcdTransformer .TransformC32ToGreenCcd(c32xml); GreenCCD greenCcdDto = greenCcdSerializer.Deserialize(greenCcdXml); return greenCcdDto; } catch (Exception ex) { String errorMessage = "Error occured when trying to parse C32"; logger.error(errorMessage, ex); throw new C32ParserException(errorMessage, ex); } } C32ParserImpl();  C32ParserImpl(C32ToGreenCcdTransformer c32ToGreenCcdTransformer,
			GreenCcdSerializer greenCcdSerializer); @Override GreenCCD ParseC32(String c32xml); }
C32ParserImpl implements C32Parser { @Override public GreenCCD ParseC32(String c32xml) throws C32ParserException { Assert.hasText(c32xml); try { String greenCcdXml = c32ToGreenCcdTransformer .TransformC32ToGreenCcd(c32xml); GreenCCD greenCcdDto = greenCcdSerializer.Deserialize(greenCcdXml); return greenCcdDto; } catch (Exception ex) { String errorMessage = "Error occured when trying to parse C32"; logger.error(errorMessage, ex); throw new C32ParserException(errorMessage, ex); } } C32ParserImpl();  C32ParserImpl(C32ToGreenCcdTransformer c32ToGreenCcdTransformer,
			GreenCcdSerializer greenCcdSerializer); @Override GreenCCD ParseC32(String c32xml);  }